Skip to content

Instantly share code, notes, and snippets.

@rpowis
Last active February 8, 2019 12:32
Show Gist options
  • Save rpowis/8ed286c471ed47a7d52797bf81dce6d3 to your computer and use it in GitHub Desktop.
Save rpowis/8ed286c471ed47a7d52797bf81dce6d3 to your computer and use it in GitHub Desktop.
releasing hmrc-frontend/package-latest
#!/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