From 63f551f21fb77d25405cc74683e6dccab2ba192c Mon Sep 17 00:00:00 2001 From: Charadon Date: Mon, 8 Aug 2022 18:42:29 -0400 Subject: Updated README and added a check for LAST_COMMIT --- README | 3 +++ dscip | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README b/README index ae0980f..b70ed7c 100644 --- a/README +++ b/README @@ -9,3 +9,6 @@ Gitlab-ci and Jenkins. This script was also made to be as POSIX compliant as possible, so it should run on basically every platform with a POSIX shell. Refer to the docs folder for how to use DSCIP. + +1.0 will probably be released once I'm sure most if not all bugs are gone. +Which is swiftly approaching. diff --git a/dscip b/dscip index de733e7..d27c9cc 100755 --- a/dscip +++ b/dscip @@ -114,12 +114,15 @@ 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 + if [ -z "$LAST_COMMIT" ]; then # Check if LAST_COMMIT was grabbed successfully. + return 0 + fi fi + export LAST_COMMIT # Loads current commit hash # CURRENT_COMMIT=$(git ls-remote "$DSCIP_GITREPO" | awk "/refs\/(heads|tags)\/$DSCIP_BRANCH/{print \$1}") - if [ -z "$CURRENT_COMMIT" ]; then + if [ -z "$CURRENT_COMMIT" ]; then # Checks if CURRENT_COMMIT is blank, if so, abort script. return 0 fi export CURRENT_COMMIT -- cgit 1.4.1-2-gfad0