aptly
aptly copied to clipboard
Version detection in Makefile fails when building from tarball
Detailed Description
See title. The issue is with this particular line in the Makefile:
https://github.com/aptly-dev/aptly/blob/f0a85b2b6e746f6da90ca85187ec2bb658490740/Makefile#L2
This won't work if the current directory isn't a Git repo. The most common case is when installing from a source tarball.
Context
This change is important to pretty much all package repos that package aptly; if a version with this Git version detection is released, they will have to patch the Makefile with the correct version.
Possible Implementation
Perhaps just leave it as it was before, passing a main.Version
tag to the Go build, and allowing passing a VERSION
variable to the Makefile.
Your Environment
There shouldn't be relevant information about my environment.
The behaviour actually shouldn't be different than before: https://github.com/aptly-dev/aptly/pull/1090/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L2
The only difference is that you can now specify a VERSION
file and go will embed that at build time. Maybe there should be
a check if the VERSION
file and only run git describe
when it doesn't exist.
The only difference is that you can now specify a VERSION file and go will embed that at build time. Maybe there should be a check if the VERSION file and only run git describe when it doesn't exist.
Hmm, I think that should be okay, yeah.