Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Makefile.buildbot
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-25 14:22:01 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-25 14:22:01 (GMT)
commit279c01bc8df66bf879d0633c0844fbc125b6e382 (patch)
tree3401949d521de743215b7bf457f16dedae494799 /Makefile.buildbot
parent26302ce44039a55a460e2f969d517e7cd02f1cf7 (diff)
Require a SNAPSHOT_FILENAME
Diffstat (limited to 'Makefile.buildbot')
-rw-r--r--Makefile.buildbot33
1 files changed, 22 insertions, 11 deletions
diff --git a/Makefile.buildbot b/Makefile.buildbot
index 60d6d8a..69e847c 100644
--- a/Makefile.buildbot
+++ b/Makefile.buildbot
@@ -1,20 +1,31 @@
DOCS_SOURCE=$(SOURCE_DIR)/sugar-docs/build/
DOCS_DEST=dnarvaez@shell.sugarlabs.org:~/public_html/sugar-docs/
+
SNAPSHOT_DEST_HOST=dnarvaez@shell.sugarlabs.org
SNAPSHOT_DEST_DIR=/home/dnarvaez/public_html/snapshots/
SNAPSHOT_DEST=$(SNAPSHOT_DEST_HOST):$(SNAPSHOT_DEST_DIR)$(SUGAR_BUILDBOT)
-
+SNAPSHOT_FILENAME=sugar-snapshot.tar
+SNAPSHOT_PATH=$(SNAPSHOT_TMP_DIR)/$(SNAPSHOT_FILENAME)
+SNAPSHOT_TMP_DIR:=$(shell mktemp -dut sugar-snapshot-XXXXXXXX)
+
.PHONY: upload-docs upload-snapshot
-upload-docs:
+docs-upload:
rsync -r --progress $(DOCS_SOURCE) $(DOCS_DEST)
-upload-snapshot: helpers-build
- @TMP_DIR=`mktemp -td sugar-build-snapshot-XXXX` && \
- echo "Creating snapshot" && \
- SNAPSHOT_PATH=`commands/helpers/build-snapshot $$TMP_DIR` && \
- echo "Uploading snapshot" && \
- scp $$SNAPSHOT_PATH $(SNAPSHOT_DEST) && \
- rm -rf $$TMP_DIR && \
- echo "Notifying about upload completion" && \
- ssh $(SNAPSHOT_DEST_HOST) $(SNAPSHOT_DEST_DIR)/upload-completed
+snapshot-build: helpers-build
+ @echo "Creating snapshot"
+ @commands/helpers/build-snapshot $(SNAPSHOT_PATH)
+
+snapshot-copy: snapshot-build
+ @echo "Uploading snapshot"
+ @scp $(SNAPSHOT_PATH).xz $(SNAPSHOT_DEST)
+
+snapshot-clean:
+ @rm -rf $(SNAPSHOT_TMP_DIR)
+
+snapshot-notify:
+ @echo "Notifying about upload completion"
+ @ssh $(SNAPSHOT_DEST_HOST) $(SNAPSHOT_DEST_DIR)/upload-completed
+
+snapshot-upload: snapshot-copy snapshot-clean snapshot-notify