Hakkin / twitchpipe

Pipe your favorite Twitch streams to the media player of your choice, or a file to save them for later. Supports low-latency playback.
MIT License
35 stars 5 forks source link

Update options.go #26

Closed jedai47 closed 4 months ago

jedai47 commented 4 months ago

added versioning

Hakkin commented 4 months ago

Hi, thanks for the pull request. I saw your issue and agree versioning should be added, but hadn't gotten around to thinking about how to implement it yet. This looks like a good base for that, but I have to think a bit more about how I want to do it. Ideally the version would automatically be updated instead of having it hard coded in the binary, but doing this in a controlled way probably involves setting up a build script and Github Actions to build release binaries instead of just the current "go install" instructions.

jedai47 commented 4 months ago

instead of doing something much more difficult maybe (auto-versioning) would it be at least better to go with the solution of hardcoded version, also taken into account that there is not many commits or contributors for that matter, also i would like to implement after this a version of your project that skips twitch ads. Hope you agree on that first step

Hakkin commented 4 months ago

I agree, I think it's something that can be worked on later if we want to improve it. That being said, I really don't like it being hard coded, it makes it really ambiguous if you're building off the master branch. Rather than hard coding it, I think we can read the current version from the Go build info. When installing with go directly, this will be filled with the proper version info (e.g. v0.3.1), when building from git, it will be filled with "(devel)" and the current commit hash. I think this is a good balance of both.

I'll push this changed version in a little bit.