Sfoglia il codice sorgente

Add the ability to apply patches before starting the build process

patches have to be stored under the patches/ path in your site-repo
Karsten Böddeker 8 anni fa
parent
commit
f795395c91
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      build.sh

+ 9 - 0
build.sh

@@ -53,6 +53,7 @@ fi
 MY_DIR=$(dirname $0)
 MY_DIR=$(readlink -f "$MY_DIR")
 CODE_DIR="src"
+PATCH_DIR="site/patches"
 OUTPUT_DIR="${MY_DIR}/output"
 BUILD_INFO_FILENAME="build-info.txt"
 VERSIONS_INFO_DIR="versions"
@@ -141,6 +142,14 @@ SITE_COMMIT=$(git rev-list --max-count=1 HEAD)
 
 cd ..
 
+### APPLY PATCHES TO GLUON
+if [ -d "$PATCH_DIR" ]; then
+	progress "Applying Patches ..."
+	git am $PATCH_DIR/*.patch
+	[ "$?" -eq "0" ] || abort "Failed to apply patches, mimimi."
+fi
+
+
 ### CLEAN
 if [ -d "./build/" -a "$BRANCH" != "experimental" ]; then
 	progress "Cleaning your build environment ..."