Added -v flag and makefile for application version #4
Loading…
Reference in New Issue
No description provided.
Delete Branch "asdf/gfu:add_version_flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This update adds:
To support the version information, the software must now be built using the makefile (i.e.
make
). Ifgo build
is used, some fallback information is displayed.Documentation has been updated to advise regarding the makefile.
Some notes:
As always, if you have a preferred method of doing anything let me know and I'll update it.
I do not understand a lot of what is going on, but it does seem to mostly work. I get the following output for
make install
:I get the same fatal warning when doing
make clean
. Would amake uninstall
make sense for this?EDIT: I just saw where you said that
install
was not tested. This all makes sense then.I do not believe we have any tags explicitly set, so it just uses the build tag, but I can confirm that it gets a version. I get the following output for
gfu -v
:Which looks good to me. I'm happy to merge this in, or if we wanted to wait until the rest of the makefile was tested out and worked through I can add a release branch for this and we can merge all updates into that, pending a release?
Let me know your preference.
That error is coming from
git describe --tags
failing.gfu -v
output should be:I had a tag set for the version, and attempted to push it with this branch. Your experience raises two issues:
describe --tags fails
, there is no fallback, so the version field is empty.Let me have a look in to this further.
I think
make uninstall
would be really useful and should be present ifmake install
is present. I'll add it in.In terms of testing, I am manually executing the commands using a standard user account. All the make targets work for me. I thought
make install
would not work, but it actually does, although it only putting the binary in my go bin directory. A privileged account installing to/usr/local/bin
or whatever might work differently, and I can't test this currently.I believe with the later (trying to isntall into
/usr/local/bin
that runningsudo make install
would transfer the sudo privileges down to the install command. So that should work as well.I saw your notes regarding branches with tags, and also have been reading A successful git branching model. It would be good to operate this repo in the same way you are setting up for bombadillo.
Regarding the error you had when the tag was not found, I found this commit which describes a fallback for tag issues, or non-git users. If
git describe --tags
fails, the version is read from theVERSION
file.Still working on the above, but I've implemented
make uninstall
.I skimmed the beginning of the article (I am on baby duty right now, so was not able to fully focus); it looks good. I have used a few different git branching models in my professional life... but for personal projects have generally just stuck to a constant push into master from feature branches. With Bombadillo and now gfu both picking up steam and working with other developers I think it very appropriate to have structured and organized releases. I dont know that many people are depending on them currently, but I'd like to think that both tools could build up a little steam. I know Bombadillo is used by a decent number of people. I def want to finish the article, tomorrow is likely.
Awesome. That makes sense to me. In theory they should generally line up, I suppose. But the git route, being automated, does make things easier.
Awesome re: uninstall. I, as a rule, think uninstall is a great thing to have (except when a program was installed via package manager. I think they should remove via package manager in that case).
This is looking great!
Version is recorded as a tag as well as in the VERSION file. If there is an issue with the git tag, or the source is not downloaded via
git clone
, the version is read from the VERSION file. A manual process is required to update VERSION to ensure it matches the git tag.It looks like a tag has been pushed to my fork on tildegit, but am not sure if this will merge here. I'm still not too sure on the process to set this up.
Makefile should be good to go.
Awesome. I can merge in and we can see? I know you can update commits to a tag after the fact. I'll also set up a develop branch.
OK let's give it a try then.