From 94469a598b4adb12a3177a6de55061fdd755af3c Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Sun, 1 Feb 2026 19:11:20 +0100 Subject: [PATCH] omfg the ci --- version.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/version.sh b/version.sh index 160afb0..3cb43e4 100755 --- a/version.sh +++ b/version.sh @@ -3,14 +3,17 @@ set -e # Check if version is already provided if [ -z "${APP_VERSION}" ]; then - # Get version from user - read -p "Version [latest]: " VERSIONINPUT - # If version was not provided, use the latest commit short hash as version - if [ -z ${VERSIONINPUT} ]; then + if [ -t 0 ]; then # Interactive: prompt user + # Get version from user + read -p "Version [latest]: " VERSIONINPUT + # 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" - else - APP_VERSION=${VERSIONINPUT} - fi fi # Get project commit id and URL