Skip to content

Instantly share code, notes, and snippets.

@alswl
Last active August 4, 2017 08:35
Show Gist options
  • Save alswl/07a7a2563b224984cf9ade8bab87ec1e to your computer and use it in GitHub Desktop.
Save alswl/07a7a2563b224984cf9ade8bab87ec1e to your computer and use it in GitHub Desktop.
sbt release to release-binary branch
#!/bin/bash
set -x
sbt assembly
GIT_HASH=`git rev-parse --short HEAD`
BRANCH=release-binary-`date +%y%m%d.%H%M`-$GIT_HASH
TAG=v-`date +%y%m%d.%H%M`
git tag $TAG
git push origin $TAG
git checkout --orphan $BRANCH
cp target/scala-*/*-assembly-*.jar .
git rm --cached -r .
git add -f *.jar
git commit -a -m 'release'
git push origin HEAD
git checkout -f master
git branch -D $BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment