Must give go flag for publish

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

View File

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