patch: test 8
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed

This commit is contained in:
spassignat
2026-05-02 11:05:24 +02:00
parent b7d176673a
commit 2351195836

View File

@@ -14,7 +14,7 @@ steps:
image: *git_image
commands: |
rm -rf dist
rm -f version.env
rm -f $CI_WORKSPACE/version.env
- name: prepare
image: *git_image
@@ -25,16 +25,16 @@ steps:
# Déterminer le type de version
if echo "$COMMIT_MSG" | grep -qE "^(major)(\(.*\))?!:"; then
echo "version_type=major" >> version.env
echo "version_type=major" >> $CI_WORKSPACE/version.env
echo "🔴 MAJOR - Breaking change"
elif echo "$COMMIT_MSG" | grep -qE "^(minor)(\(.*\))?:"; then
echo "version_type=minor" >> version.env
echo "version_type=minor" >> $CI_WORKSPACE/version.env
echo "🟡 MINOR - Nouvelle fonctionnalité"
elif echo "$COMMIT_MSG" | grep -qE "^(patch)(\(.*\))?:"; then
echo "version_type=patch" >> version.env
echo "version_type=patch" >> $CI_WORKSPACE/version.env
echo "🟢 PATCH - Correction"
else
echo "version_type=none" >> version.env
echo "version_type=none" >> $CI_WORKSPACE/version.env
echo "⚠️ Aucun changement de version"
fi
depends_on: [ clean_project ]
@@ -45,18 +45,18 @@ steps:
commands: |
ls -als database
npm ci --cache .npm --prefer-offline
source version.env
source $CI_WORKSPACE/version.env
if [ "$version_type" != "none" ]; then
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "📦 Version actuelle: $CURRENT_VERSION"
npm run update:$version_type
NEW_VERSION=$(node -p "require('./package.json').version")
echo "🆕 Nouvelle version: $NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> version.env
echo "CURRENT_VERSION=$CURRENT_VERSION" >> version.env
echo "artifact=${CI_REPO_NAME}-$NEW_VERSION.tar" >> version.env
echo "NEW_VERSION=$NEW_VERSION" >> $CI_WORKSPACE/version.env
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $CI_WORKSPACE/version.env
echo "artifact=${CI_REPO_NAME}-$NEW_VERSION.tar" >> $CI_WORKSPACE/version.env
else
echo "artifact=no-artifact" >> version.env
echo "artifact=no-artifact" >> $CI_WORKSPACE/version.env
echo "⏭️ Pas de mise à jour de version"
fi
depends_on: [ prepare ]
@@ -75,8 +75,8 @@ steps:
- name: package
image: *node_image
commands: |
more version.env
source version.env
more $CI_WORKSPACE/version.env
source $CI_WORKSPACE/version.env
if [ "$version_type" != "none" ]; then
WDIR=${CI_WORKSPACE}/artifacts/$NEW_VERSION
echo "create work directory: $WDIR"
@@ -102,7 +102,7 @@ steps:
NEXUS_PASSWORD:
from_secret: nexus_password
commands: |
source version.env
source $CI_WORKSPACE/version.env
echo "📦 Publication de la version $NEW_VERSION : $artifact"
ls -als ${CI_WORKSPACE}/artifacts/$artifact
@@ -121,8 +121,8 @@ steps:
from_secret: gitea_token
commands: |
# Charger les variables
more version.env
source version.env
more $CI_WORKSPACE/version.env
source $CI_WORKSPACE/version.env
echo "version type: $version_type"
if [ "$version_type" != "none" ]; then