adding version input, adjusting tests
Some checks failed
test / test (push) Failing after 3s

This commit is contained in:
2025-05-22 21:49:48 -04:00
parent d45fdbf3ca
commit 55cb2b2be5
4 changed files with 33 additions and 9 deletions

View File

@@ -27,8 +27,13 @@ echo "Parsing go version"
# -P uses perl syntax
DL_VERSION_RAW="$(grep "^go [0-9]+.[0-9]+" go.mod -P)"
if [[ -z "$DL_VERSION_RAW" ]]; then
echo "FATAL: Unable to pull version from go.mod"
exit 1
#no go.mod file found
DL_VERSION_RAW=$GO_INSTALL_VERSION
#no version input set either
if [[ "$DL_VERSION_RAW" == "." ]]; then
echo "FATAL: No Go version found, set version input if no go.mod file is present"
exit 1
fi
fi
echo "Found go version: ${DL_VERSION_RAW}"