Skip to content

Commit 743efb5

Browse files
committed
Merge pull request #143 from adriaanm/2.11.x
2.11.x
2 parents 2035c46 + e713185 commit 743efb5

File tree

5 files changed

+90
-0
lines changed

5 files changed

+90
-0
lines changed

conf/repositories

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[repositories]
2+
plugins: http://dl.bintray.com/sbt/sbt-plugin-releases/, [organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
3+
private-repo: http://private-repo.typesafe.com/typesafe/scala-release-temp/
4+
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
5+
sbt-plugin-releases: http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
6+
maven-central
7+
local
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash -ex
2+
# need to re-declare it as an array, not sure how to do that directly in jenkins
3+
declare -a sshCharaArgs="$sshCharaArgs"
4+
5+
url="http://downloads.typesafe.com/scala/$version"
6+
7+
if [[ "$version" =~ .*-nightly ]]
8+
then archivesDir="~linuxsoft/archives/scala/nightly/2.11.x"
9+
else archivesDir="~linuxsoft/archives/scala"
10+
fi
11+
12+
# make this build restartable (if interrupted, partial files may remain, and resuming isn't very reliable)
13+
[[ -n $version ]] && ssh "${sshCharaArgs[@]}" "rm -f $archivesDir/scala-*$version* && rm -rf $archivesDir/api/$version/ ||:"
14+
15+
cacheBuster="$(date +%s | tail -c2 | head -c1)"
16+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.msi '$url/scala-$version.msi?$cacheBuster'"
17+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.zip '$url/scala-$version.zip?$cacheBuster'"
18+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.tgz '$url/scala-$version.tgz?$cacheBuster'"
19+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.deb '$url/scala-$version.deb?$cacheBuster'"
20+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.rpm '$url/scala-$version.rpm?$cacheBuster'"
21+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.zip '$url/scala-docs-$version.zip?$cacheBuster'"
22+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.tgz '$url/scala-docs-$version.tgz?$cacheBuster'"
23+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.txz '$url/scala-docs-$version.txz?$cacheBuster'"
24+
25+
echo "Expanding scala-library API docs for $version to api/$version (with subdirectories for scala-compiler and scala-reflect)."
26+
ssh "${sshCharaArgs[@]}" "cd $archivesDir && mkdir -p api/$version && tar -xvz --strip-component 2 -f scala-docs-$version.tgz -C api/$version && mv api/$version/scala-library/* api/$version/" # tar on jenkins does not support the -s option
27+
28+
echo "Expanding the Scaladoc for other bundled modules"
29+
# treat scala-actors separately because it's not cross-versioned
30+
ssh "${sshCharaArgs[@]}" "(set -x; cd $archivesDir && mkdir -p api/$version/scala-actors && unzip \$(find api/$version/jars -name 'scala-actors-2.11*javadoc.jar' -o -name scala-actors-${version}-javadoc.jar) -d api/$version/scala-actors;)"
31+
32+
modules="scala-actors-migration scala-continuations-library scala-parser-combinators scala-swing scala-xml"
33+
for m in $modules; do
34+
ssh "${sshCharaArgs[@]}" "(set -x; cd $archivesDir && mkdir -p api/$version/$m && unzip \$(find api/$version/jars -name ${m}_'*javadoc.jar' -o -name ${m}-${version}-javadoc.jar) -d api/$version/$m;)"
35+
done
36+
37+
echo "Symlinking api/$version to api/2.11.x."
38+
39+
ssh "${sshCharaArgs[@]}" "cd $archivesDir/api/ ; [[ -d $version ]] && ln -sfn $version 2.11.x"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# @pre current directory == repo root
2+
3+
# to be extra-sure we don't pollute
4+
rm -rf $WORKSPACE/.ivy2
5+
6+
. scripts/scala-release-2.11.x-pkg
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# @pre current directory == repo root
2+
3+
# to be extra-sure we don't pollute
4+
rm -rf "$(/usr/bin/cygpath --unix $WORKSPACE/.ivy2)"
5+
6+
. scripts/scala-release-2.11.x-pkg

scripts/scala-release-2.11.x-pkg

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# @pre current directory == repo root
2+
# must run on both windows (cygwin) and linux
3+
4+
# invoked from scala-release-2.11.x-[unix|windows]
5+
6+
# uses the following env vars:
7+
# - WORKSPACE, JAVA_OPTS (jenkins standard)
8+
# - version checked for consistency against HEAD's tag
9+
# - sbtLauncher is a global jenkins configuration variable
10+
# - sbtDistTarget the target (beyond clean and update) to run
11+
# - sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!)
12+
13+
# requires git (>= 1.8), java, bash
14+
15+
repositoriesFile="$WORKSPACE/conf/repositories"
16+
17+
tags="$(git tag --points-at HEAD)"
18+
19+
# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag
20+
# this is also a backstop for https://github.com/sbt/sbt-git/issues/35
21+
# ignore when there is no version (job is running outside of the flow)
22+
[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then
23+
echo "Inconsistent tag/version combo detected. Abort-abort."
24+
exit 255
25+
fi
26+
27+
# want full control over sbt, so invoke the launcher directly
28+
java $JAVA_OPTS -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \
29+
-Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \
30+
-jar $sbtLauncher \
31+
$sbtDistVersionOverride \
32+
clean update $sbtDistTarget

0 commit comments

Comments
 (0)