Swaager run script change
@@ -21,7 +21,15 @@ jobs:
- name: Run Swagger
run: ./tools/gen-code-from-swagger.sh
- name: Error on change
- run: (( `git status -s | wc -l` == 0 )) && exit 0 || exit 1
+ run: |
+ # check if anything is different
+ CHANGED=$(git status -s | wc -l)
+ if [ "$CHANGED" -gt 0 ]; then
+ echo "Please run ./tools/gen-code-from-swagger.sh script and commit changes"
+ exit 1
+ else
+ exit 0
+ fi
Unit-Tests:
needs: [Run-Swagger]
runs-on: ubuntu-latest
