File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -eou pipefail
3+
4+ current_version=$( jq -r ' .version' tools/spectral/ipa/package.json)
5+
6+ previous_version=$( git show origin/" ${BASE_BRANCH} " :tools/spectral/ipa/package.json | jq -r ' .version' )
7+
8+ if [[ -z " $previous_version " || " $previous_version " == " null" ]]; then
9+ previous_version=" none"
10+ fi
11+
12+ if [[ " $previous_version " == " $current_version " ]]; then
13+ echo " false"
14+ else
15+ echo " true"
16+ fi
Original file line number Diff line number Diff line change @@ -18,23 +18,15 @@ jobs:
1818 tools/spectral/ipa
1919
2020 - name : Fetch Versions
21- working-directory : tools/spectral/ipa
2221 id : version_check
2322 run : |
24- current_version=$(jq '.version' package.json)
25- echo "Current version: $current_version"
26-
27- previous_version=$(git show origin/${{ github.event.pull_request.base.ref }}:tools/spectral/ipa/package.json | jq -r '.version')
28-
29- if [[ -z "$previous_version" || "$previous_version" == "null" ]]; then
30- previous_version="none"
31- fi
32- echo "Previous version : $previous_version"
33-
23+ chmod +x ./.github/scripts/ipa_version_check.sh
24+ version_changed=$(./.github/scripts/ipa_version_check.sh)
25+ echo "Version changed? $version_changed"
3426 - name : Check Changelog
3527 working-directory : tools/spectral/ipa
3628 env :
37- VERSION_BUMP : ${{ steps.version_check.outputs.current_version != steps.version_check.outputs.previous_version && 'true' || 'false' }}
29+ VERSION_BUMP : ${{ steps.version_check.outputs.version_changed }}
3830 run : |
3931 npm run gen-ipa-changelog
4032
You can’t perform that action at this time.
0 commit comments