From 8ea8327df8d8a3fa790d809896e76d987e68b002 Mon Sep 17 00:00:00 2001 From: BAK BYEONG JUN Date: Sun, 13 Apr 2025 02:35:44 +0000 Subject: [PATCH] init --- tasks/pyversion/task.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/pyversion/task.yaml b/tasks/pyversion/task.yaml index abfc4f9..155eeea 100644 --- a/tasks/pyversion/task.yaml +++ b/tasks/pyversion/task.yaml @@ -15,7 +15,7 @@ spec: - name: imageName type: string - description: Python version to use (e.g., 3.9, 3.11) + description: Python image to use (e.g., python:3.9, python:3.11) default: "python:3.11-slim" workspaces: @@ -24,7 +24,7 @@ spec: results: - name: version - description: Extracted project version (e.g. 0.2.0) + description: Extracted project version with 'v' prefix (e.g. v0.2.0) steps: - name: verify-tag @@ -43,7 +43,7 @@ spec: TAG_FROM_REF=$(basename "$FULL_REF") # → v0.2.0 echo "📄 Reading version from pyproject.toml..." - pip install tomli + pip install --quiet tomli VERSION=$(python3 -c 'import tomli; print(tomli.load(open("pyproject.toml", "rb"))["tool"]["poetry"]["version"])') TAG_FROM_PROJECT="v${VERSION}" @@ -56,5 +56,5 @@ spec: exit 1 fi - echo "✅ Tag and version match: $VERSION" - echo -n "$VERSION" > /tekton/results/version + echo "✅ Tag and version match: $TAG_FROM_PROJECT" + echo -n "$TAG_FROM_PROJECT" > /tekton/results/version