Hello, may I suggest adding version number to lf?
Recently I was working with several different versions of lf on the servers and local workstations, but found one version has very slow performance. Only by checking the source code folder, I realized it was an 'older' version from 2018/01. As lf development is really moving fast, perhaps at some point version numbers can be added to lf. Thanks
Proper version numbers and releases with tags would also help with enabling CI/CD.
Beside this I'd like to create Void Linux package for lf but I can't since their policy does not allow git packages.
related #90
@ipstone I agree we definitely need some kind of a version number in the binary. I will try a few things for automatic build deployment in the other issue @TeddyDD mentioned. Then I can focus on version releases and add these to the binary.
I have now added a -version flag to the binary. Value of this option is passed at compile time using go build -ldflags="-X main.gVersion=$version" which looks like the common practice these days. I have added this to our cross build script so binaries in the release section should have the proper versions. Semantic versioning feels like overkill for now so I started versioning using a single number (e.g. r1, r2 and so on) as in three.js.
Hello, I just did lf -version, but it only outputs 'empty string'. I am using golang ver 1.9.3 on mac os x. Is this a bug? thanks
Additionally, perhpas the flag should be -v, --version, as the usual convention.
@ipstone I don't think it is a bug. The way versioning is implemented is that you need to pass the current version number while building. This is the case for binaries in the releases section. If you are building yourself from the source, you need something along the line:
go build -ldflags="-X main.gVersion=$(git describe --tags)"
Golang flag package does not implement short options, most likely due to poor readability and ambiguities. For example -v is the usual convention for both --version and --verbose.
I have now pushed our second release and things seem to be working fine. I'm closing this issue now.
Most helpful comment
I have now added a
-versionflag to the binary. Value of this option is passed at compile time usinggo build -ldflags="-X main.gVersion=$version"which looks like the common practice these days. I have added this to our cross build script so binaries in the release section should have the proper versions. Semantic versioning feels like overkill for now so I started versioning using a single number (e.g.r1,r2and so on) as in three.js.