Skip to content

2.11.x #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2014
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions conf/repositories
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[repositories]
plugins: http://dl.bintray.com/sbt/sbt-plugin-releases/, [organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
private-repo: http://private-repo.typesafe.com/typesafe/scala-release-temp/
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-plugin-releases: http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central
local
39 changes: 39 additions & 0 deletions scripts/jobs/scala-release-2.11.x-scala-lang
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash -ex
# need to re-declare it as an array, not sure how to do that directly in jenkins
declare -a sshCharaArgs="$sshCharaArgs"

url="http://downloads.typesafe.com/scala/$version"

if [[ "$version" =~ .*-nightly ]]
then archivesDir="~linuxsoft/archives/scala/nightly/2.11.x"
else archivesDir="~linuxsoft/archives/scala"
fi

# make this build restartable (if interrupted, partial files may remain, and resuming isn't very reliable)
[[ -n $version ]] && ssh "${sshCharaArgs[@]}" "rm -f $archivesDir/scala-*$version* && rm -rf $archivesDir/api/$version/ ||:"

cacheBuster="$(date +%s | tail -c2 | head -c1)"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.msi '$url/scala-$version.msi?$cacheBuster'"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.zip '$url/scala-$version.zip?$cacheBuster'"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.tgz '$url/scala-$version.tgz?$cacheBuster'"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.deb '$url/scala-$version.deb?$cacheBuster'"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-$version.rpm '$url/scala-$version.rpm?$cacheBuster'"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.zip '$url/scala-docs-$version.zip?$cacheBuster'"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.tgz '$url/scala-docs-$version.tgz?$cacheBuster'"
ssh "${sshCharaArgs[@]}" "cd $archivesDir && wget -nv -O scala-docs-$version.txz '$url/scala-docs-$version.txz?$cacheBuster'"

echo "Expanding scala-library API docs for $version to api/$version (with subdirectories for scala-compiler and scala-reflect)."
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

echo "Expanding the Scaladoc for other bundled modules"
# treat scala-actors separately because it's not cross-versioned
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;)"

modules="scala-actors-migration scala-continuations-library scala-parser-combinators scala-swing scala-xml"
for m in $modules; do
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;)"
done

echo "Symlinking api/$version to api/2.11.x."

ssh "${sshCharaArgs[@]}" "cd $archivesDir/api/ ; [[ -d $version ]] && ln -sfn $version 2.11.x"
6 changes: 6 additions & 0 deletions scripts/jobs/scala-release-2.11.x-unix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# @pre current directory == repo root

# to be extra-sure we don't pollute
rm -rf $WORKSPACE/.ivy2

. scripts/scala-release-2.11.x-pkg
6 changes: 6 additions & 0 deletions scripts/jobs/scala-release-2.11.x-windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# @pre current directory == repo root

# to be extra-sure we don't pollute
rm -rf "$(/usr/bin/cygpath --unix $WORKSPACE/.ivy2)"

. scripts/scala-release-2.11.x-pkg
32 changes: 32 additions & 0 deletions scripts/scala-release-2.11.x-pkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# @pre current directory == repo root
# must run on both windows (cygwin) and linux

# invoked from scala-release-2.11.x-[unix|windows]

# uses the following env vars:
# - WORKSPACE, JAVA_OPTS (jenkins standard)
# - version checked for consistency against HEAD's tag
# - sbtLauncher is a global jenkins configuration variable
# - sbtDistTarget the target (beyond clean and update) to run
# - sbtDistVersionOverride may be -Dproject.version=.... to override the version of the dist to build (only for testing, you should use tags for real releases!)

# requires git (>= 1.8), java, bash

repositoriesFile="$WORKSPACE/conf/repositories"

tags="$(git tag --points-at HEAD)"

# version is set by the scala-release-2.11.x-dist build flow, make sure it's consistent with the tag
# this is also a backstop for https://github.com/sbt/sbt-git/issues/35
# ignore when there is no version (job is running outside of the flow)
[[ -z $sbtDistVersionOverride ]] && [[ -n $version ]] && if [ "$tags" != "v$version" ]; then
echo "Inconsistent tag/version combo detected. Abort-abort."
exit 255
fi

# want full control over sbt, so invoke the launcher directly
java $JAVA_OPTS -Dsbt.log.noformat=true -Dsbt.ivy.home=$WORKSPACE/.ivy2 \
-Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \
-jar $sbtLauncher \
$sbtDistVersionOverride \
clean update $sbtDistTarget