GithubHelp home page GithubHelp logo

Comments (9)

pocc avatar pocc commented on July 21, 2024

Getting the same thing for termshark --help:

bash-5.0$ termshark --help
termshark v<localbuild>

A wireshark-inspired terminal user interface for tshark. Analyze network traffic interactively from your terminal.
See https://github.com/gcla/termshark for more information.

Usage:
  termshark [FilterOrFile]


// output truncated ...

from termshark.

gcla avatar gcla commented on July 21, 2024

Thanks, you are right - I should make this better. I used goreleaser to make the binaries on github - it runs something like:

go install -ldflags="-X github.com/gcla/termshark.Version=1.0.0" ./...

It would be better if absent that flag, the last release version was used, maybe with an asterisk next to it.

from termshark.

k0ste avatar k0ste commented on July 21, 2024

@gcla go build will be supported?

from termshark.

gcla avatar gcla commented on July 21, 2024

Hi @k0ste - yes, go build ought to be supported. This will fix the problem:

go build -ldflags="-X github.com/gcla/termshark.Version=1.0.0" github.com/gcla/termshark/cmd/termshark

but it's ugly. Maybe I should put the version number in the code for now so that regular builds don't display the ugly "localbuild", and until I decide on a better approach.

from termshark.

gcla avatar gcla commented on July 21, 2024

I changed the hard-coded version to "1.0.0++" for now, intended to mean 1.0.0 + some extra commits. We'll have to remember to update this when a new release is tagged, until I find a better way. I'd love to keep it simple and have go build/go install just work, and not need go generate.

from termshark.

k0ste avatar k0ste commented on July 21, 2024

@gcla for package maintainers we definitely need go build support.

  • Download tar.gz release from github releases;
  • Satisfy dependencies;
  • go build, i.e. without git;

from termshark.

QuLogic avatar QuLogic commented on July 21, 2024

Is there a reason it's Version and not version, which is automatically set by Goreleaser? https://goreleaser.com/environment/#using-the-main-version

from termshark.

pocc avatar pocc commented on July 21, 2024

In golang, variables with capitals are exported and accessible to external packages. It doesn't look like this is strictly necessary though as the example's default is lowercase:

ldflags:
     - -s -w -X main.version={{.Version}}

from termshark.

gcla avatar gcla commented on July 21, 2024

Hi @QuLogic - no good reason at all, I didn't know goreleaser did that automatically

from termshark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.