Skip to content
This repository was archived by the owner on Feb 23, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 37 additions & 27 deletions job/scala-release-2.11.x
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash -ex
# requirements:
# sbtCmd must point to sbt from sbt-extras (this is the standard on the Scala jenkins, so we only support that one)
# - ~/.sonatype-curl that consists of user = USER:PASS
# - ~/.m2/settings.xml with credentials for sonatype
# <server>
Expand All @@ -25,25 +26,26 @@
# tagged: $TAG, publish to sonatype staging and close repo -- let the humans release)

# defaults for jenkins params
SCALA_VER_BASE=${SCALA_VER_BASE-"2.11.0"}
SCALA_VER_SUFFIX=${SCALA_VER_SUFFIX-"-M8"}
XML_VER=${XML_VER-"1.0.0-RC7"}
PARSERS_VER=${PARSERS_VER-"1.0.0-RC5"}
CONTINUATIONS_VER=${CONTINUATIONS_VER-"1.0.0-RC3"}
SWING_VER=${SWING_VER-"1.0.0-RC2"}
PARTEST_VER=${PARTEST_VER-"1.0.0-RC8"}
PARTEST_IFACE_VER=${PARTEST_IFACE_VER-"0.2"}
SCALACHECK_VER=${SCALACHECK_VER-"1.11.2"}

SCALA_REF=${SCALA_REF-"master"}
XML_REF=${XML_REF-"v$XML_VER"}
PARSERS_REF=${PARSERS_REF-"v$PARSERS_VER"}
CONTINUATIONS_REF=${CONTINUATIONS_REF-"v$CONTINUATIONS_VER"}
SWING_REF=${SWING_REF-"v$SWING_VER"}
PARTEST_REF=${PARTEST_REF-"v$PARTEST_VER"}
PARTEST_IFACE_REF=${PARTEST_IFACE_REF-"v$PARTEST_IFACE_VER"}
SCALACHECK_REF=${SCALACHECK_REF-"$SCALACHECK_VER"}

SCALA_VER_BASE=${SCALA_VER_BASE-"2.11.0"}
SCALA_VER_SUFFIX=${SCALA_VER_SUFFIX-"-RC1"}
XML_VER=${XML_VER-"1.0.0"}
PARSERS_VER=${PARSERS_VER-"1.0.0"}
CONTINUATIONS_VER=${CONTINUATIONS_VER-"1.0.0"}
SWING_VER=${SWING_VER-"1.0.0"}
ACTORS_MIGRATION_VER=${ACTORS_MIGRATION_VER-"1.0.0"}
PARTEST_VER=${PARTEST_VER-"1.0.0"}
PARTEST_IFACE_VER=${PARTEST_IFACE_VER-"0.2"}
SCALACHECK_VER=${SCALACHECK_VER-"1.11.3"}

SCALA_REF=${SCALA_REF-"master"}
XML_REF=${XML_REF-"v$XML_VER"}
PARSERS_REF=${PARSERS_REF-"v$PARSERS_VER"}
CONTINUATIONS_REF=${CONTINUATIONS_REF-"v$CONTINUATIONS_VER"}
SWING_REF=${SWING_REF-"v$SWING_VER"}
ACTORS_MIGRATION_REF=${ACTORS_MIGRATION_REF-"v$ACTORS_MIGRATION_VER"}
PARTEST_REF=${PARTEST_REF-"v$PARTEST_VER"}
PARTEST_IFACE_REF=${PARTEST_IFACE_REF-"v$PARTEST_IFACE_VER"}
SCALACHECK_REF=${SCALACHECK_REF-"$SCALACHECK_VER"}

baseDir=${baseDir-`pwd`}
sbtCmd=${sbtCmd-sbt}
Expand Down Expand Up @@ -142,12 +144,21 @@ buildModules() {
'set credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")'\
"set pgpPassphrase := Some(Array.empty)" $@

# TODO: actors-migration, akka-actor
update scala actors-migration "$ACTORS_MIGRATION_REF"
$sbtCmd $sbtArgs 'set version := "'$ACTORS_MIGRATION_VER'"' \
'set scalaVersion := "'$SCALA_VER'"' \
'set credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")'\
"set pgpPassphrase := Some(Array.empty)" $@

# TODO: akka-actor
# script: akka/project/script/release
# sbt tasks: akka-actor/publishLocal, akka-actor-tests/test and akka-actor/publishSigned.
# properties: "-Dakka.genjavadoc.enabled=true -Dpublish.maven.central=true”.
# branch: wip-2.2.3-for-scala-2.11
}


# test and publish to $stagingRepo
# Duplicated because I cannot for the life of me figure out how to pass in these quoted sbt commands as args to a bash function
# test and publish modules necessary to bootstrap Scala to $stagingRepo
publishModulesPrivate() {
update scala scala-xml "$XML_REF"
$sbtCmd $sbtArgs 'set version := "'$XML_VER'"' \
Expand Down Expand Up @@ -196,23 +207,22 @@ publishModulesPrivate() {
'set credentials in ThisBuild += Credentials(Path.userHome / ".ivy2" / ".credentials-private-repo")'\
clean test publish


update scala scala-swing "$SWING_REF"
$sbtCmd $sbtArgs 'set version := "'$SWING_VER'"' \
'set scalaVersion := "'$SCALA_VER'"' \
"set publishTo := Some($resolver)"\
'set credentials += Credentials(Path.userHome / ".ivy2" / ".credentials-private-repo")'\
clean test publish

# TODO: scalatest
}


update scala scala $SCALA_REF

# publish core so that we can build modules with this version of Scala and publish them locally
# for bootstrapping, publish core (or at least smallest subset we can get away with)
# so that we can build modules with this version of Scala and publish them locally
# must publish under $SCALA_VER so that the modules will depend on this (binary) version of Scala
# publish more than just core: partest needs scalap
# in sabbus lingo, the resulting Scala build will be used as starr to build the released Scala compiler
ant -Dmaven.version.number=$SCALA_VER\
-Dremote.snapshot.repository=NOPE\
-Drepository.credentials.id=$stagingCred\
Expand All @@ -225,6 +235,7 @@ ant -Dmaven.version.number=$SCALA_VER\

# build, test and publish modules with this core
# publish to our internal repo (so we can resolve the modules in the scala build below)
# we only need to build the modules necessary to build Scala itself
publishModulesPrivate


Expand Down Expand Up @@ -258,7 +269,6 @@ ant -Dstarr.version=$SCALA_VER\
# git commit versions.properties -m"Bump versions.properties for $SCALA_VER."



# overwrite "locker" version of scala at private-repo with bootstrapped version
ant -Dmaven.version.number=$SCALA_VER\
-Dremote.snapshot.repository=NOPE\
Expand Down