Must give go flag for publish

This commit is contained in:
Clemens Schwaighofer
2023-06-01 11:09:37 +09:00
parent 4b084f8785
commit d648e4339a

View File

@@ -3,6 +3,7 @@
BASE_FOLDER=$(dirname $(readlink -f $0))"/";
VERSION=$(git tag --list | sort -V | tail -n1 | sed -e "s/^v//");
file_last_published="${BASE_FOLDER}last.published";
go_flag="$1";
if [ -z "${VERSION}" ]; then
echo "Version must be set in the form x.y.z without any leading characters";
@@ -35,6 +36,13 @@ source .env.deploy;
cd -;
set +o allexport;
if [ "${go_flag}" != "go" ]; then
echo "No go flag given";
echo "Would publish ${VERSION} on ${file_last_published}";
echo "[END]";
exit;
fi;
echo "[START]";
# gitea
if [ ! -z "${GITEA_URL_DL}" ] && [ ! -z "${GITEA_URL_PUSH}" ] &&