-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set version to unknown if not set #4521
Conversation
Wouldn't it be better to update the variable So if I checkout Or did you already do this and forgot? I wonder if it is easy to automate. I do not know your release procedures, but I guess a script like this would help you: if tagname.nil?
STDOUT.puts "USAGE:"
STDOUT.puts "To tag: git_tag_and_push.rb tagname"
exit 1
else
# Update the version
system("sed -i \"s/1.7.0/1.8.0/g\" cmd/telegraf/telegraf.go")
# Add the new file, and commit
system("git add cmd/telegraf/telegraf.go")
system("git commit -m 'Update version number #{tagname}'")
# Add the tag
system("git tag -a #{tagname} -m 'Tagging for release: #{tagname}'")
system("git push origin #{tagname}")
end |
I think this is a valid argument but I would prefer to have one less step when it comes to preparing a release. My philosophy here is that if it isn't a release then it doesn't have a version. I highly recommend that you use the Makefile to ensure this is set automatically when building a tag. |
Fair enough, thanks for pointing out the Makefile, I missed the versioning that it does 👍 I noticed that the build-task in the Makefile does not include Thanks. |
We use the ldflags in the official builds because they shrink the size of the binary, but not during development. You probably want these flags if you are not planning to use a debugger, although I'm not sure exactly how much the functionality is limited by stripping symbols. The official releases are made using |
Prevents setting the branch version to the last major release, and as a bonus we no longer need to set this variable on release:
closes #4516
Required for all PRs: