Skip to content

Commit f54c2d7

Browse files
committed
Import from jenkins-scripts
1 parent 2035c46 commit f54c2d7

File tree

5 files changed

+133
-0
lines changed

5 files changed

+133
-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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash -ex
2+
url="http://downloads.typesafe.com/scala/$version"
3+
4+
if [[ "$version" =~ .*-nightly ]]
5+
then archivesDir="~linuxsoft/archives/scala/nightly/2.11.x"
6+
else archivesDir="~linuxsoft/archives/scala"
7+
fi
8+
9+
# make this build restartable (if interrupted, partial files may remain, and resuming isn't very reliable)
10+
[[ -n $version ]] && ssh scalatest@chara "rm -f $archivesDir/scala-*$version* && rm -rf $archivesDir/api/$version/ ||:"
11+
12+
cacheBuster="$(date +%s | tail -c2 | head -c1)"
13+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.msi '$url/scala-$version.msi?$cacheBuster'"
14+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.zip '$url/scala-$version.zip?$cacheBuster'"
15+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.tgz '$url/scala-$version.tgz?$cacheBuster'"
16+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.deb '$url/scala-$version.deb?$cacheBuster'"
17+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-$version.rpm '$url/scala-$version.rpm?$cacheBuster'"
18+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.zip '$url/scala-docs-$version.zip?$cacheBuster'"
19+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.tgz '$url/scala-docs-$version.tgz?$cacheBuster'"
20+
ssh scalatest@chara "cd $archivesDir && wget -nv -O scala-docs-$version.txz '$url/scala-docs-$version.txz?$cacheBuster'"
21+
22+
echo "Expanding scala-library API docs for $version to api/$version (with subdirectories for scala-compiler and scala-reflect)."
23+
ssh scalatest@chara "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
24+
25+
echo "Expanding the Scaladoc for other bundled modules"
26+
# treat scala-actors separately because it's not cross-versioned
27+
ssh scalatest@chara "(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;)"
28+
29+
modules="scala-actors-migration scala-continuations-library scala-parser-combinators scala-swing scala-xml"
30+
for m in $modules; do
31+
ssh scalatest@chara "(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;)"
32+
done
33+
34+
echo "Symlinking api/$version to api/2.11.x."
35+
36+
ssh scalatest@chara "cd $archivesDir/api/ ; [[ -d $version ]] && ln -sfn $version 2.11.x"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# no bang here, because we want to run both under cygwin and real unix
2+
# sbtDistTarget must be supplied
3+
# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!)
4+
# sbtLauncher is a global jenkins configuration variable
5+
repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release"
6+
7+
echo "Using repo config:"
8+
cat "$repositoriesFile"
9+
10+
# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag
11+
# this is also a backstop for https://github.com/sbt/sbt-git/issues/35
12+
# ignore when there is no version (job is running outside of the flow)
13+
14+
# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git
15+
# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)"
16+
tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)"
17+
18+
[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then
19+
echo "Inconsistent tag/version combo detected. Abort-abort."
20+
exit 255
21+
fi
22+
23+
rm -rf $WORKSPACE/.ivy2
24+
25+
# want full control over sbt, so invoke the launcher directly
26+
java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \
27+
-Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \
28+
-jar $sbtLauncher \
29+
$sbtDistVersionOverride \
30+
clean update $sbtDistTarget
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# no bang here, because we want to run both under cygwin and real unix
2+
# sbtDistTarget must be supplied
3+
# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!)
4+
# sbtLauncher is a global jenkins configuration variable
5+
repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release"
6+
7+
echo "Using repo config:"
8+
cat "$repositoriesFile"
9+
10+
# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag
11+
# this is also a backstop for https://github.com/sbt/sbt-git/issues/35
12+
# ignore when there is no version (job is running outside of the flow)
13+
14+
# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git
15+
# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)"
16+
tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)"
17+
18+
[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then
19+
echo "Inconsistent tag/version combo detected. Abort-abort."
20+
exit 255
21+
fi
22+
23+
rm -rf $WORKSPACE/.ivy2
24+
25+
# want full control over sbt, so invoke the launcher directly
26+
java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \
27+
-Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \
28+
-jar $sbtLauncher \
29+
$sbtDistVersionOverride \
30+
clean update $sbtDistTarget

scripts/scala-release-2.11.x-pkg

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# no bang here, because we want to run both under cygwin and real unix
2+
# sbtDistTarget must be supplied
3+
# sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!)
4+
# sbtLauncher is a global jenkins configuration variable
5+
repositoriesFile="$WORKSPACE/jenkins-scripts/repositories-scala-release"
6+
7+
echo "Using repo config:"
8+
cat "$repositoriesFile"
9+
10+
# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag
11+
# this is also a backstop for https://github.com/sbt/sbt-git/issues/35
12+
# ignore when there is no version (job is running outside of the flow)
13+
14+
# http://stackoverflow.com/questions/4545370/how-to-list-all-tags-pointing-to-a-specific-commit-in-git
15+
# if only we had git 1.7.10 or higher: tags="$(git tag --points-at HEAD)"
16+
tags="$(git show-ref --tags -d | grep $(git rev-parse HEAD) | cut -f3 -d/ | cut -f1 -d^)"
17+
18+
[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then
19+
echo "Inconsistent tag/version combo detected. Abort-abort."
20+
exit 255
21+
fi
22+
23+
rm -rf $WORKSPACE/.ivy2
24+
25+
# want full control over sbt, so invoke the launcher directly
26+
java -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \
27+
-Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \
28+
-jar $sbtLauncher \
29+
$sbtDistVersionOverride \
30+
clean update $sbtDistTarget

0 commit comments

Comments
 (0)