Skip to content

Commit

Permalink
fix: linting errors for zkevm api scripts (#3522)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImmutableJeffrey authored and YermekG committed Jan 19, 2025
1 parent 5e2a010 commit 2d87e21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/update-zkevm-api-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Get current date and time
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S')"
run: echo "name=date::$(date +'%Y-%m-%d-%H-%M-%S')" >> "$GITHUB_OUTPUT"

- name: Download remote openapi.json
run: curl -o openapi_remote.json https://imx-openapiv3-mr-sandbox.s3.us-east-2.amazonaws.com/openapi.json
Expand All @@ -37,10 +37,10 @@ jobs:
- name: Compare remote openapi.json with local openapi.json
id: comparison
run: |
if diff openapi_remote.json ./Source/ImmutablezkEVMAPI/openapi-generator/openapi.json > /dev/null; then
echo "::set-output name=difference::false"
if diff "openapi_remote.json" "./Source/ImmutablezkEVMAPI/openapi-generator/openapi.json" > /dev/null; then
echo "name=difference::false" >> "$GITHUB_OUTPUT"
else
echo "::set-output name=difference::true"
echo "name=difference::true" >> "$GITHUB_OUTPUT"
fi
- name: NPM install OpenAPI Generator CLI globally
Expand All @@ -55,9 +55,9 @@ jobs:
- name: Generate API if there are differences
if: steps.comparison.outputs.difference == 'true'
run: |
cd ./Source/ImmutablezkEVMAPI/openapi-generator/batch-files
cd "./Source/ImmutablezkEVMAPI/openapi-generator/batch-files"
./generate.sh
cd ../../../../
cd "../../../../"
- name: Clean up
if: steps.comparison.outputs.difference == 'true'
Expand All @@ -75,13 +75,13 @@ jobs:
id: commit_changes
if: steps.comparison.outputs.difference == 'true'
run: |
git add ./Source/ImmutablezkEVMAPI/
git add "./Source/ImmutablezkEVMAPI/"
if [ -n "$(git diff --cached)" ]; then
git commit -m "feat: update immutable zkEVM API package"
echo "commit=true" >> $GITHUB_ENV
echo "commit=true" >> "$GITHUB_ENV"
else
echo "No changes to commit."
echo "commit=false" >> $GITHUB_ENV
echo "commit=false" >> "$GITHUB_ENV"
fi
- name: Push changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ INPUT="-i https://imx-openapiv3-mr-sandbox.s3.us-east-2.amazonaws.com/openapi.js
OUTPUT="-o ../.."
ADDITIONAL_PROPERTIES="--additional-properties=modelNamePrefix=API,cppNamespace=ImmutablezkEVMAPI,unrealModuleName=ImmutablezkEVMAPI"

$OPENAPI_GENERATOR_CLI generate $GENERATOR $TEMPLATE $INPUT $OUTPUT $ADDITIONAL_PROPERTIES
$OPENAPI_GENERATOR_CLI generate "$GENERATOR" "$TEMPLATE" "$INPUT" "$OUTPUT" "$ADDITIONAL_PROPERTIES"

0 comments on commit 2d87e21

Please sign in to comment.