test korjaus
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 19s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 55s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m51s
CI Feature / Report Summary (push) Successful in 5s

This commit is contained in:
moilanik
2026-06-19 08:31:14 +03:00
parent a3225843d4
commit ede87654f4
+3 -3
View File
@@ -3,7 +3,7 @@ set -e
RAW_VERSION=""
if [ -n "${VERSION_FILE}" ] && [ -f "${VERSION_FILE}" ]; then
if [ -n "${VERSION_FILE-}" ] && [ -f "${VERSION_FILE-}" ]; then
RAW_VERSION=$(sed -n 's/^version:[[:space:]]*\([^[:space:]]*\).*/\1/p' "${VERSION_FILE}")
if [ -z "${RAW_VERSION}" ]; then
if echo "${VERSION_FILE}" | grep -q -E '\.json$'; then
@@ -35,7 +35,7 @@ echo "gitea-ci-library - Tunnistettu Major.Minor versio: $BASE_VERSION"
TAGS_JSON=$(curl -s -f -H "Authorization: token ${GITEA_TOKEN}" \
"${SERVER_URL}/api/v1/repos/${REPO}/tags")
TAG=$(echo "$TAGS_JSON" | jq -r --arg prefix "${GIT_TAG_PREFIX}" --arg sha "${SHA}" '
TAG=$(echo "$TAGS_JSON" | jq -r --arg prefix "${GIT_TAG_PREFIX-}" --arg sha "${SHA}" '
if type == "array" then
.[] | select(.commit.sha == $sha and (.name | startswith($prefix))) | .name
else empty end' | head -1)
@@ -49,7 +49,7 @@ if [ -n "$TAG" ]; then
else
echo "ARTIFACT_EXISTS=false" > /tmp/build-ctx/build.env
HIGHEST_PATCH=$(echo "$TAGS_JSON" | jq -r --arg prefix "${GIT_TAG_PREFIX}" --arg bv "${GIT_TAG_PREFIX}${BASE_VERSION}." '
HIGHEST_PATCH=$(echo "$TAGS_JSON" | jq -r --arg prefix "${GIT_TAG_PREFIX-}" --arg bv "${GIT_TAG_PREFIX-}${BASE_VERSION}." '
if type == "array" then .[] | .name | select(startswith($bv)) | sub($bv; "") | tonumber else empty end' | sort -rn | head -1)
if [ -z "$HIGHEST_PATCH" ]; then NEXT_PATCH=0; else NEXT_PATCH=$((HIGHEST_PATCH + 1)); fi