Skip to content

ops: check version changes #4

ops: check version changes

ops: check version changes #4

Workflow file for this run

on:
pull_request:
branches:
- development
- master
paths:
- "src/**"
jobs:
version-check:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize'
script:
- TARGET_BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- TARGET_VERSION=$(git show origin/$TARGET_BRANCH:src/package.json | grep '"version"' | cut -d '"' -f 4)
- CURRENT_VERSION=$(cat src/package.json | grep '"version"' | cut -d '"' -f 4)
- echo "Versão na branch $TARGET_BRANCH: $TARGET_VERSION"
- echo "Versão na branch atual: $CURRENT_VERSION"
- if [ "$TARGET_VERSION" == "$CURRENT_VERSION" ]; then
echo "Erro: Version is equal, change version to publish changes on NPM!";

Check failure on line 20 in .github/workflows/check-version.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check-version.yml

Invalid workflow file

You have an error in your yaml syntax on line 20
exit 1;
else
echo "Different versions, changes will be published";
fi