diff options
Diffstat (limited to 'dscip')
-rwxr-xr-x | dscip | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dscip b/dscip index fb09c62..64b3833 100755 --- a/dscip +++ b/dscip @@ -16,7 +16,7 @@ # limitations under the License. # ################################################################################ -set -e +set -eu cd "$(dirname "$0")" . "$(pwd -P)/config.sh" @@ -101,10 +101,12 @@ run () { # Loads last commit hash if it exists. # if [ -f "$WORKING_DIRECTORY/LAST_COMMIT" ]; then LAST_COMMIT="$(cat "$WORKING_DIRECTORY/LAST_COMMIT")" + export LAST_COMMIT fi # Loads current commit hash # CURRENT_COMMIT=$(git ls-remote "$DSCIP_GITREPO" | awk "/refs\/(heads|tags)\/$DSCIP_BRANCH/{print \$1}") + export CURRENT_COMMIT # If LAST_COMMIT doesn't exist, that means it's a first run and we can go ahead and build. # # Or skip the commit check if DSCIP_DISREGARD_COMMIT_CHECK is set to true. |