From 30a0092515b454266a5419af9d9603677f82901f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info>
Date: Thu, 7 Apr 2016 20:11:10 +0200
Subject: [PATCH] cache subrepos

---
 .gitlab-ci.yml |  3 +++
 upload         | 13 ++++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index befbc381..d430d9e7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,9 @@ upload:
 
 cache:
   untracked: true
+  paths:
+    - static/
+    - content/
 
 # Needs following env var: LFTP_PASSWORD
 
diff --git a/upload b/upload
index 3f62eef6..0178a176 100755
--- a/upload
+++ b/upload
@@ -8,8 +8,9 @@ fi
 rm -rf build
 mkdir -p build/theme
 time node index.js --noserver
-echo "Site compilation ended with status code $?"
-if [ $? -ne 0 ]
+RET=$?
+echo "Site compilation ended with status code $RET"
+if [ $RET -ne 0 ]
 then
     echo "Error detected. Exitting."
     exit 1
@@ -33,7 +34,8 @@ if [ "$1" == "ftp" ]; then
                   open --user $USER --env-password ftp://$HOST/;\
                   mirror -c --verbose=9 -e -R -L ./build /;\
                   exit 0;"
-    echo "LFTP finished with return code $?"
+    RET=$?
+    echo "LFTP finished with return code $RET"
 else
     echo "Using SFTP"
     time lftp -e "set sftp:auto-confirm yes;\
@@ -44,7 +46,8 @@ else
                   open --user $USER --env-password -p 2121 sftp://$HOST/;\
                   mirror -c --verbose=9 -e -R -L ./build /;\
                   exit 0;"
-    echo "LFTP finished with return code $?"
+    RET=$?
+    echo "LFTP finished with return code $RET"
 fi
-exit 0
+exit $RET
 
-- 
GitLab