about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--README3
-rwxr-xr-xdscip7
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