summaryrefslogtreecommitdiff
path: root/hw/Makefile
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-18 02:26:31 -0300
committerGenerated from internal repo <nobody@neo900.org>2016-09-18 02:26:31 -0300
commita75033fc56f2c1e4d11788a808e8b92e91e5e1f2 (patch)
tree9208973f0e82331924abaa11691645812bca72ac /hw/Makefile
parent537e9c94eead602a99f1b0e99ead497e30370a0b (diff)
downloadee-a75033fc56f2c1e4d11788a808e8b92e91e5e1f2.tar.gz
ee-a75033fc56f2c1e4d11788a808e8b92e91e5e1f2.tar.bz2
ee-a75033fc56f2c1e4d11788a808e8b92e91e5e1f2.zip
hw/Makefile (upload): generate and upload PDF and tar.bz2 snapshots
Diffstat (limited to 'hw/Makefile')
-rw-r--r--hw/Makefile30
1 files changed, 29 insertions, 1 deletions
diff --git a/hw/Makefile b/hw/Makefile
index 901c529..1304942 100644
--- a/hw/Makefile
+++ b/hw/Makefile
@@ -1,7 +1,7 @@
NAME = neo900
SCHTOC = ../../misc/schtoc/schtoc.pl
-.PHONY: pull sch sort brd pdf clean
+.PHONY: pull sch sort brd pdf upload upload-pdf upload-tar clean
pull:
git pull
@@ -26,5 +26,33 @@ pdf:
$(SCHTOC) -n -z neo900.sch neo900.pdf >neo900-toc.pdf || \
{ rm -f neo900-toc.pdf; exit 1; }
+DATE = $(shell date -u +"%Y%m%d-%H%M%SZ")
+COMMIT = $(shell git log -1 --format='%h' -s)
+PDF_NAME = neo900-$(DATE)-$(COMMIT).pdf
+PDF_DIR = pub/werner/tmp/ee/pdf
+TAR_NAME = neo900-$(DATE)-$(COMMIT).tar.bz2
+TAR_DIR = pub/werner/tmp/ee/tar
+TAR_EXTRA = kicad-libs/components/gencon.lib
+
+upload: upload-pdf upload-tar
+
+upload-pdf:
+ eeplot neo900.pro -o $(PDF_NAME)
+ neo900 $(PDF_NAME) $(PDF_DIR)
+ echo "cd $(PDF_DIR) && ln -sf $(PDF_NAME) neo900.pdf" | \
+ neo900
+ rm -f $(PDF_NAME)
+
+upload-tar:
+ tar cfj $(TAR_NAME) \
+ --no-recursion --xform 's|^|neo900-$(DATE)-$(COMMIT)/|' \
+ `git ls-files` \
+ `git submodule --quiet foreach \
+ 'git ls-files | sed "s|^|$$path/|"'` $(TAR_EXTRA)
+ neo900 $(TAR_NAME) $(TAR_DIR)
+ echo "cd $(TAR_DIR) && ln -sf $(TAR_NAME) neo900.tar.bz2" | \
+ neo900
+ rm -f $(TAR_NAME)
+
clean:
rm -f _tmp