Skip to content
This repository was archived by the owner on Feb 23, 2018. It is now read-only.

Commit fa91e02

Browse files
committed
Merge pull request #126 from lrytz/publish-fixes
fixes to publishing nighlies
2 parents 6ffca28 + d0ac081 commit fa91e02

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

archive-nightly

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,36 @@ mkdir jenkins-artifacts
1111
# publish-nightly publishes scaladoc, distribution archives
1212
[[ -d build/scaladoc ]] && {
1313
mkdir -p jenkins-artifacts/build
14-
rsync -rlv build/scaladoc jenkins-artifacts/build/
15-
}
16-
[[ -d dists/archives ]] && {
17-
mkdir -p jenkins-artifacts/dists
18-
rsync -rlv dists/archives jenkins-artifacts/dists/
14+
rsync -rl build/scaladoc jenkins-artifacts/build/
1915
}
16+
17+
# since 2.11.x, we don't publish nightly archives anymore (tgz/zip etc). commenting
18+
# this out also stops publishing archiving them for 2.10.x
19+
#[[ -d dists/archives ]] && {
20+
# mkdir -p jenkins-artifacts/dists
21+
# rsync -rl dists/archives jenkins-artifacts/dists/
22+
#}
23+
24+
# sbaz is long gone.
2025
#[[ -d dists/sbaz ]] && {
2126
# mkdir -p jenkins-artifacts/dists
22-
# rsync -rlv dists/sbaz jenkins-artifacts/dists/
27+
# rsync -rl dists/sbaz jenkins-artifacts/dists/
2328
#}
2429

25-
# publish-nightly publishes maven artifacts
26-
[[ -d dists/maven ]] && {
30+
# publish-nightly publishes maven artifacts. this is still in use for 2.10.x.
31+
# for 2.11.x and later, maven nightlies are published directly in scala-nightly-main.
32+
# the dists/maven/latest/build.xml file does not exist for 2.11.x and later, so we test on that.
33+
[[ -e dists/maven/latest/build.xml ]] && {
2734
mkdir -p jenkins-artifacts/dists
28-
rsync -rlv dists/maven jenkins-artifacts/dists/
35+
rsync -rl dists/maven jenkins-artifacts/dists/
2936
}
3037

3138
# scala-nightly-signatures checks signatures of scala-library.jar
32-
[[ -e dists/latest/lib/scala-library.jar ]] && {
33-
mkdir -p jenkins-artifacts/dists/latest/lib
34-
cp dists/latest/lib/scala-library.jar jenkins-artifacts/dists/latest/lib/scala-library.jar
35-
}
39+
# disabled - scala-nighlty-signatures is disabled for months.
40+
#[[ -e dists/latest/lib/scala-library.jar ]] && {
41+
# mkdir -p jenkins-artifacts/dists/latest/lib
42+
# cp dists/latest/lib/scala-library.jar jenkins-artifacts/dists/latest/lib/scala-library.jar
43+
#}
3644

3745
tar czf jenkins-artifacts.tgz jenkins-artifacts
3846
rm -rf jenkins-artifacts

job/scala-nightly-main

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ scriptsDir="$( cd "$( dirname "$0" )/.." && pwd )"
88
$scriptsDir/build
99
savedState=$?
1010

11-
if grep -q '<target name="publish"' build.xml; then
11+
# on 2.10.x, publishing to maven is not done here. instead, the archive-nightly task (below)
12+
# saves the files in dists/maven/latest, and the downstream job (archive-nightly) will do the
13+
# publishing.
14+
# this has changed 2.11.x, maven publishing is part of the main build.xml. so we do it here,
15+
# easier than fixing up the archive-nightly script.
16+
[[ $publish == "true" ]] && grep -q '<target name="publish"' build.xml && {
1217
ant publish
1318
savedStatePublish=$?
14-
fi
19+
}
1520

1621
$scriptsDir/archive-nightly
1722
exit $(($savedState || $savedStatePublish))

publish-nightly

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,16 @@ EOM
2424

2525
cd jenkins-artifacts
2626

27-
[[ -d dists/archives ]] || {
28-
echo "Can't find build, has it completed? No directory at dists/archives"
29-
exit 1
27+
# Archive Scala nightly distribution (no-op by now, we no longer publish nightly tgz/zip/...)
28+
[[ -d dists/archives ]] && {
29+
rsync -az dists/archives/ "$nightly_rsync_dest/distributions"
3030
}
3131

32-
# Archive Scala nightly distribution
33-
rsync -az dists/archives/ "$nightly_rsync_dest/distributions"
34-
3532
# publish scaladoc nightlies
3633
rsync -az build/scaladoc/ "$nightly_rsync_dest/$scaladocDir"
3734

38-
# push to the maven repository
39-
# in master, we've already published during the main job
40-
if [[ "$jobName" != *-master ]]; then
35+
# push to the maven repository. in 2.11.x and above, we've already published during the main job
36+
[[ -e dists/maven/latest/build.xml ]]; then
4137
cd dists/maven/latest
4238
ant deploy -Dsettings.file=$maven_settings_file
4339
fi

0 commit comments

Comments
 (0)