Last active
February 8, 2019 12:32
-
-
Save rpowis/8ed286c471ed47a7d52797bf81dce6d3 to your computer and use it in GitHub Desktop.
releasing hmrc-frontend/package-latest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Set up `package-latest` branch in the `package` directory | |
rm -rf package | |
git fetch origin | |
git checkout package-latest && git checkout master | |
git worktree add package package-latest | |
# Build | |
npm run build:package &&\ | |
# Push | |
cd package &&\ | |
git add -A &&\ | |
git commit -m "Automated package release of $(git log '--format=format:%H' master -1)" &&\ | |
git push &&\ | |
# Cleanup | |
cd .. | |
rm -rf package | |
git worktree prune | |
git branch -D package-latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment