-
Notifications
You must be signed in to change notification settings - Fork 40
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
Build Feature - Version Increment #16
Comments
For smaller projects I often just use the day's date as a version signifier - could HEMTT support that? E.g, 2019.02.17. |
Once templating is done, you should be able to do that |
@bovine3dom this is how it would look like with version = "{{date \"%Y\"}}.{{date \"%m\"}}.{{date \"%d\"}}" This request is probably best implement with a
[scripts.version]
show_output = true
steps = [
"@version -i build",
"git commit -am \"Prepare release {{version}}\""
]
$ hemtt version -i minor # Increment minor number
$ hemtt run version # Run helper script (build number + git commit) This is of course entirely up to the project and how they handle or wish to handle releases. But I think we shouldn't do any invasive git operations automatically in HEMTT, scripts provide a perfect way to accomplish that. I came up with this examples from how we would want to do it in ACE3/CBA (how it is done) and ACRE2 (how Jenkins would do it through external script). Idea on version file list configuration (files that contain version that needs updating): # Specify files where version needs updating, without source (script_version.hpp)
version_files = [
"mod.cpp",
"README.md"
] Ideas on $ hemtt version # Argument --update -u maybe?
$ hemtt version --increment major
$ hemtt version --inc minor # Maybe not?
$ hemtt version -i patch
$ hemtt version -i build
This is all largely taken from ACE3/CBA/ACRE2's Ideally, we could also support: $ hemtt version -i minor
$ hemtt run release [scripts.release]
show_output = true
steps = [
"@version -i build", # Would automatically use date specifier as above
"git commit -am \"Prepare release {{version}}\"",
"build --release -f", # After version commit, we want headerext to be up-to-date
"git push" # Push preperation commit
] For that, we need to allow running HEMTT commands inside scripts - though warning, could end up in a loop if not used correctly. |
This is now possible with hooks, I don't think a specific command is needed |
release MINOR/MAJOR/PATCH
with build always increased (if it exists).Could also do
release --inc minor/major/patch
.version
The text was updated successfully, but these errors were encountered: