Skip to content

Commit a8c9804

Browse files
committed
Merge branch 'common-build-script'
2 parents b6617b0 + 9c15462 commit a8c9804

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

tools/epfl-build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Usage: $0 <version> [opt opt ...]
1010
Example: $0 -Xcheckinit -Ycheck:all
1111
1212
Environment variables:
13-
14-
EXTRA_TARGETS Additional ant targets to run after nightly
13+
extra_ant_targets Additional ant targets to run after nightly
1514
1615
EOM
1716
exit 0
@@ -25,5 +24,5 @@ ant all.clean && ./pull-binary-libs.sh
2524

2625
ant $scalaArgs build-opt &&
2726
ant $scalaArgs nightly &&
28-
for target in $EXTRA_TARGETS; do ant $target ; done
27+
for target in $extra_ant_targets; do ant $target ; done
2928
# [[ -n "$BUILD_DOCSCOMP" ]] && ant docscomp

tools/epfl-publish

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
#!/usr/bin/env bash
22
#
3-
# publishes nightly build
3+
# publishes nightly build if $publish_to is set in environment.
4+
#
45

5-
[[ $# -eq 2 ]] || {
6+
[[ $# -eq 1 ]] || {
67
cat <<EOM
7-
Usage: $0 <scala version> <rsync dest>
8+
Usage: $0 <scala version>
9+
10+
Environment variables:
11+
publish_to rsync destination
812
EOM
913
exit 0
1014
}
15+
version="$1"
1116

1217
[[ -d dists/archives ]] || {
1318
echo "Can't find build, has it completed? No directory at dists/archives"
1419
exit 1
1520
}
1621

17-
version="$1"
18-
rsyncDest="$2"
19-
2022
# should not be hardcoded
2123
mavenSettings="/home/linuxsoft/apps/hudson-maven-settings/settings.xml"
2224

23-
echo "Copying nightly build to $rsyncDest"
24-
# Archive Scala nightly distribution
25-
rsync -az dists/archives/ "$rsyncDest/distributions"
26-
# don't publish docs in 2.8.x
27-
[[ $version == "2.8.x" ]] || rsync -az build/scaladoc/ "$rsyncDest/docs"
28-
# sbaz
29-
[[ -d dists/sbaz ]] && rsync -az dists/sbaz/ "$rsyncDest/sbaz"
30-
# Deploy the maven artifacts on scala-tools.org
31-
( cd dists/maven/latest && ant deploy.snapshot -Dsettings.file="$mavenSettings" )
25+
if [[ -z $publish_to ]]; then
26+
echo "Nothing to publish."
27+
else
28+
echo "Publishing nightly build to $publish_to"
29+
# Archive Scala nightly distribution
30+
rsync -az dists/archives/ "$publish_to/distributions"
31+
# don't publish docs in 2.8.x
32+
[[ $version == "2.8.x" ]] || rsync -az build/scaladoc/ "$publish_to/docs"
33+
# sbaz
34+
[[ -d dists/sbaz ]] && rsync -az dists/sbaz/ "$publish_to/sbaz"
35+
# Deploy the maven artifacts on scala-tools.org
36+
( cd dists/maven/latest && ant deploy.snapshot -Dsettings.file="$mavenSettings" )
37+
fi

0 commit comments

Comments
 (0)