-
Notifications
You must be signed in to change notification settings - Fork 4
write version string like Urcheon #16
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
Conversation
Keep the possibility to append username (something Urcheon does not) but make it optional and not enabled by default.
|
Where does the string go? Can you give an example? |
…/Unvanquished $ ../unvanquished-release-scripts/build-release -v vm
[…]
Creating archive: …/Unvanquished/build/release/vm_0.52.1-20220213-205227-e971ec0.dpkIf |
|
So, I improved the version compute, it now takes care of situations like no git repo, no commit, not version tag. I'll probably backport the code to Urcheon as this one is simpler and much faster (I had less git knowledge when I did the code in Urcheon). |
build-release
Outdated
|
|
||
| if [ -n "${git_last_commit}" ] | ||
| then | ||
| local git_last_commit_short="${git_last_commit:0:7}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use git rev-parse --short HEAD for the short hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
build-release
Outdated
| git_ref="$(git describe --tags --match 'v*' | cut -c2-)" | ||
| git_last_tag="$(git describe --tags --match 'v*' | cut -f1 -d'-' | cut -c2-)" | ||
| git_last_date="$(date --date="@$(git log -1 '--pretty=format:%ct')" -u '+%Y%m%d-%H%M%S')" | ||
| build_version+="$(printVersion)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why += ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
LGTM |
build-release: write version string like Urcheon
Keep the possibility to append username (something Urcheon does not) but make
it optional and not enabled by default.
Note: appending username is convenient when modding.