Skip to content

Commit fa0af53

Browse files
committed
Merge pull request #36 from retronym/release/0.9.0-M1
Release/0.9.0 m1
2 parents 1942128 + b7ccc99 commit fa0af53

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

release.sh

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

src/test/scala/scala/async/package.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ package object async {
4343
}
4444

4545
def scalaBinaryVersion: String = {
46+
val PreReleasePattern = """.*-(M|RC).*""".r
4647
val Pattern = """(\d+\.\d+)\..*""".r
4748
scala.util.Properties.versionNumberString match {
49+
case s @ PreReleasePattern(_) => s
4850
case Pattern(v) => v
4951
case _ => ""
5052
}

0 commit comments

Comments
 (0)