Procházet zdrojové kódy

Implement web files local installation

As well as some checks.
DricomDragon před 5 roky
rodič
revize
97a91f33b8
1 změnil soubory, kde provedl 21 přidání a 1 odebrání
  1. 21 1
      ci/install-web-files.fish

+ 21 - 1
ci/install-web-files.fish

@@ -2,9 +2,29 @@
 # Aim at deploying on local httpd server
 set fish_trace 1
 
-echo $WEBLAND_WEB_DEPLOY_PATH
+# Check existence of deployment target
 if not set -q WEBLAND_WEB_DEPLOY_PATH
 	exit 1
 end
 
+set destinationPath $WEBLAND_WEB_DEPLOY_PATH
+
+if not test -e $destinationPath
+	exit 2
+end
+
+# Check existence of source
+if not set gitTopLevel (git rev-parse --show-toplevel)
+	exit 3
+end
+
+set sourcePath $gitTopLevel/web/
+
+if not test -e $sourcePath
+	exit 4
+end
+
+# Deploy
+rsync --recursive --verbose --delete-after $sourcePath $destinationPath
+
 exit 0