File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
-
2
1
name : Javascript Wrapper Release
3
2
4
3
on :
91
90
echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
92
91
echo "::set-output name=CLI_VERSION::$CLI_VERSION"
93
92
93
+ - name : Check if CLI version is latest
94
+ id : check_latest_cli_version
95
+ run : |
96
+ if [ "${{ inputs.dev }}" == "false" ] || [ -n "${{ inputs.cliTag }}" ] || [ "${{ github.ref }}" != "refs/heads/main" ]; then
97
+ exit 0
98
+ fi
99
+
100
+ LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
101
+ if [ "$CLI_VERSION" = "$LATEST_CLI_VERSION" ]; then
102
+ echo "Confirm that the CLI version in the repository is up-to-date with the most recent release: $CLI_VERSION"
103
+ else
104
+ echo "The current repository contains a CLI version that differs from the latest released version: Expected $LATEST_CLI_VERSION, got $CLI_VERSION"
105
+ exit 1
106
+ fi
107
+
94
108
- name : NPM ci and build
95
109
run : |
96
110
npm ci
You can’t perform that action at this time.
0 commit comments