add fix
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Pedro Pérez 2025-05-30 01:14:43 +02:00
parent 012ab48110
commit c8167af618

View File

@ -16,10 +16,8 @@ steps:
commands: commands:
- echo "Checking project version..." - echo "Checking project version..."
- VERSION_CURRENT=$(grep 'version =' main.go | cut -d'"' -f2) - VERSION_CURRENT=$(grep 'version =' main.go | cut -d'"' -f2)
- echo "Project version: $VERSION_CURRENT"
- PREV_COMMIT=$(git rev-parse HEAD^) - PREV_COMMIT=$(git rev-parse HEAD^)
- VERSION_PREV=$(git show "$PREV_COMMIT:main.go" | grep 'version =' | cut -d'"' -f2) - VERSION_PREV=$(git show "$PREV_COMMIT:main.go" | grep 'version =' | cut -d'"' -f2)
- echo "Previous version: $VERSION_PREV"
- | - |
if [ "$VERSION_CURRENT" = "$VERSION_PREV" ]; then if [ "$VERSION_CURRENT" = "$VERSION_PREV" ]; then
echo "❌ The version has not changed. You must update it to merge to main." echo "❌ The version has not changed. You must update it to merge to main."