You've already forked pedini.dev
omfg the ci
Some checks failed
Deploy website on production server when committing on main / test (push) Failing after 8s
Some checks failed
Deploy website on production server when committing on main / test (push) Failing after 8s
This commit is contained in:
17
version.sh
17
version.sh
@@ -3,14 +3,17 @@ set -e
|
|||||||
|
|
||||||
# Check if version is already provided
|
# Check if version is already provided
|
||||||
if [ -z "${APP_VERSION}" ]; then
|
if [ -z "${APP_VERSION}" ]; then
|
||||||
# Get version from user
|
if [ -t 0 ]; then # Interactive: prompt user
|
||||||
read -p "Version [latest]: " VERSIONINPUT
|
# Get version from user
|
||||||
# If version was not provided, use the latest commit short hash as version
|
read -p "Version [latest]: " VERSIONINPUT
|
||||||
if [ -z ${VERSIONINPUT} ]; then
|
# If version was not provided, use the latest commit short hash as version
|
||||||
|
if [ -z ${VERSIONINPUT} ]; then
|
||||||
|
APP_VERSION="latest"
|
||||||
|
else
|
||||||
|
APP_VERSION=${VERSIONINPUT}
|
||||||
|
fi
|
||||||
|
else # Non-interactive (CI): default to "latest"
|
||||||
APP_VERSION="latest"
|
APP_VERSION="latest"
|
||||||
else
|
|
||||||
APP_VERSION=${VERSIONINPUT}
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get project commit id and URL
|
# Get project commit id and URL
|
||||||
|
|||||||
Reference in New Issue
Block a user