-
Notifications
You must be signed in to change notification settings - Fork 99
Add release automation script. #33
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
bsneed
commented
Aug 3, 2021
- Added release.sh
- Updated releasing.md
- Added safety text in Version.swift to deter by-hand modification.
// DO NOT MODIFY THIS FILE BY HAND!! | ||
// DO NOT MODIFY THIS FILE BY HAND!! | ||
// DO NOT MODIFY THIS FILE BY HAND!! | ||
// DO NOT MODIFY THIS FILE BY HAND!! |
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.
😂
release.sh
Outdated
exit 1 | ||
fi | ||
|
||
versionFile="./sources/Segment/version.swift" |
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.
not sure if V
needs to be uppercase
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.
case insensitive file system; but yeah it should be.
vercomp () { | ||
if [[ $1 == $2 ]] | ||
then | ||
return 0 |
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.
if the new version is the same as old version, we should error out, right?
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.
yup
changelog=git log --pretty=format:"- (%an) %s" $(git describe --tags --abbrev=0 @^)..@ | ||
tempFile=$(mktemp) | ||
#write changelog to temp file. | ||
echo $changelog >> $tempFile |
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.
whats the reason for a temp file?
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.
I write the changelog out there, and then gh release will read it in from there.
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.
added some comments, but looks good