Skip to content

Commit 0339ec1

Browse files
committed
Merge pull request #6 from retronym/topic/release
A modest release script
2 parents 81c108b + a1b235f commit 0339ec1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

release.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! /bin/bash -e
2+
3+
function sbt211() {
4+
sbt 'set scalaVersion := "2.11.0-RC3"' 'set scalaBinaryVersion := scalaVersion.value' $@
5+
return $?
6+
}
7+
die () {
8+
echo "$@"
9+
exit 1
10+
}
11+
12+
CHECK=";clean;test;publishLocal"
13+
RELEASE=";clean;test;publish"
14+
VERSION=`gsed -rn 's/version :=.*"(.+).*"/\1/p' build.sbt`
15+
[[ -n "$(git status --porcelain)" ]] && die "working directory is not clean!"
16+
17+
sbt $CHECK
18+
sbt $RELEASE
19+
sbt211 $CHECK
20+
sbt211 $RELEASE
21+
22+
cat <<EOM
23+
Released! For non-snapshot releases:
24+
- tag: git tag -s -a v$VERSION -m "scala-java8-compat $VERSION"
25+
- push tag: git push origin v$VERSION
26+
- close and release the staging repository: https://oss.sonatype.org
27+
- change the version number in build.sbt to a suitable -SNAPSHOT version
28+
EOM

0 commit comments

Comments
 (0)