Skip to content

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

Merged
merged 2 commits into from
Aug 3, 2021
Merged

Add release automation script. #33

merged 2 commits into from
Aug 3, 2021

Conversation

bsneed
Copy link
Contributor

@bsneed 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!!
Copy link
Contributor

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"
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@prayansh prayansh left a 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

@bsneed bsneed merged commit 0c3d3fe into main Aug 3, 2021
@bsneed bsneed deleted the bsneed/release_automation branch August 3, 2021 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants