summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-03 16:00:18 -0800
committerPaul Phillips <paulp@improving.org>2012-02-03 16:00:18 -0800
commit2f3370524f2348ab2bdc0665f548ac8c5bf586c7 (patch)
tree2b82b0b2ecd00d7a999597e4346bdb902a7ec22a
parent5c7086b3c89ef5b7483bf5750b31dd76ab8b0cee (diff)
downloadscala-2f3370524f2348ab2bdc0665f548ac8c5bf586c7.tar.gz
scala-2f3370524f2348ab2bdc0665f548ac8c5bf586c7.tar.bz2
scala-2f3370524f2348ab2bdc0665f548ac8c5bf586c7.zip
Injecting epfl-publish into merge-base.
-rwxr-xr-xtools/epfl-publish32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/epfl-publish b/tools/epfl-publish
new file mode 100755
index 0000000000..4982f930bb
--- /dev/null
+++ b/tools/epfl-publish
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+#
+# publishes nightly build if $publish_to is set in environment.
+#
+
+[[ $# -eq 1 ]] || {
+ cat <<EOM
+Usage: $0 <scala version>
+
+Environment variables:
+ publish_to rsync destination
+EOM
+ exit 0
+}
+version="$1"
+
+[[ -d dists/archives ]] || {
+ echo "Can't find build, has it completed? No directory at dists/archives"
+ exit 1
+}
+
+if [[ -z $publish_to ]]; then
+ echo "Nothing to publish."
+else
+ echo "Publishing nightly build to $publish_to"
+ # Archive Scala nightly distribution
+ rsync -az dists/archives/ "$publish_to/distributions"
+ # don't publish docs in 2.8.x
+ [[ $version == "2.8.x" ]] || rsync -az build/scaladoc/ "$publish_to/docs"
+ # sbaz
+ [[ -d dists/sbaz ]] && rsync -az dists/sbaz/ "$publish_to/sbaz"
+fi