From d0a75a33ed62c7c86bc4859a4f58b9051c419596 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 27 Apr 2018 05:08:49 +0200 Subject: [PATCH] Follow-up commit --- WebConfigGenerator/cc.sh | 16 ++++++++++++++-- docs | 1 - 2 files changed, 14 insertions(+), 3 deletions(-) delete mode 120000 docs diff --git a/WebConfigGenerator/cc.sh b/WebConfigGenerator/cc.sh index 3aae324bd..a44ef8565 100755 --- a/WebConfigGenerator/cc.sh +++ b/WebConfigGenerator/cc.sh @@ -1,16 +1,28 @@ #!/bin/bash set -eu -OUTPUT="dist" +OUTPUT="dist" # Relative to script directory +TARGET="../docs" # Relative to script directory +SRC="WebConfigGenerator" # Path between $OUTPUT and $TARGET cd "$(dirname "$(readlink -f "$0")")" +cd "$SRC_DIR" + git pull npm install npm run build +while read -r FILE; do + rm -f "$FILE" +done < <(find "$TARGET" -mindepth 1 -maxdepth 1 -type l) + +while read -r FILE; do + ln -s "${SRC}/${FILE}" "$TARGET" +done < <(find "$OUTPUT" -mindepth 1 -maxdepth 1) + git reset -git add -A -f "$OUTPUT" +git add -A -f "$OUTPUT" "$TARGET" git commit -m "WebConfigGenerator build" git push diff --git a/docs b/docs deleted file mode 120000 index 109c6f608..000000000 --- a/docs +++ /dev/null @@ -1 +0,0 @@ -WebConfigGenerator/dist \ No newline at end of file