diff options
Diffstat (limited to 'dscip')
-rwxr-xr-x | dscip | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dscip b/dscip index db7726e..61208a0 100755 --- a/dscip +++ b/dscip @@ -17,7 +17,8 @@ ################################################################################ set -e -. "$(dirname "$(realpath "$0")")/config.sh" +cd "$(dirname "$0")" +. "$(pwd -P)/config.sh" ################################################################################ @@ -65,10 +66,10 @@ echo "DSCIP_OUTPUT_TO=$DSCIP_OUTPUT_TO" build () { if [ "$DSCIP_GITMODE" = "clone" ]; then rm -rf "$WORKING_DIRECTORY/wrkdir" # Clean Up # - git clone -b "$DSCIP_BRANCH" "$DSCIP_GITREPO" wrkdir >> "$DSCIP_OUTPUT_TO" 2>&1 # Clone git # + git clone --depth 1 -b "$DSCIP_BRANCH" "$DSCIP_GITREPO" wrkdir >> "$DSCIP_OUTPUT_TO" 2>&1 # Clone git # elif [ "$DSCIP_GITMODE" = "pull" ]; then if [ ! -d "$WORKING_DIRECTORY/wrkdir" ]; then - git clone -b "$DSCIP_BRANCH" "$DSCIP_GITREPO" wrkdir >> "$DSCIP_OUTPUT_TO" 2>&1 + git clone --depth 1 -b "$DSCIP_BRANCH" "$DSCIP_GITREPO" wrkdir >> "$DSCIP_OUTPUT_TO" 2>&1 fi cd wrkdir git pull >> "$DSCIP_OUTPUT_TO" 2>&1 @@ -79,13 +80,13 @@ build () { { cd "$WORKING_DIRECTORY/wrkdir"; echo "Running pre-build commands..."; - $DSCIP_PRE_CMD; + "$DSCIP_PRE_CMD"; echo "Running build commands..."; cd "$WORKING_DIRECTORY/wrkdir"; - $DSCIP_BUILD_CMD; + "$DSCIP_BUILD_CMD"; echo "Running post-build commands..."; cd "$WORKING_DIRECTORY/wrkdir"; - $DSCIP_POST_CMD; + "$DSCIP_POST_CMD"; } >> "$DSCIP_OUTPUT_TO" 2>&1 echo "$CURRENT_COMMIT" > "$WORKING_DIRECTORY/LAST_COMMIT" # Save commit # } |