From 72180c7269fd30ca129a2716de7ae8a5488e9ed2 Mon Sep 17 00:00:00 2001 From: ImmutableJeffrey Date: Wed, 15 Jan 2025 07:33:24 +1000 Subject: [PATCH] fix: linting errors for zkevm api scripts (#3522) --- .github/workflows/update-zkevm-api-package.yml | 12 ++++++------ .../openapi-generator/batch-files/generate.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-zkevm-api-package.yml b/.github/workflows/update-zkevm-api-package.yml index c612932e..b8fafb49 100644 --- a/.github/workflows/update-zkevm-api-package.yml +++ b/.github/workflows/update-zkevm-api-package.yml @@ -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 @@ -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 @@ -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' diff --git a/Source/ImmutablezkEVMAPI/openapi-generator/batch-files/generate.sh b/Source/ImmutablezkEVMAPI/openapi-generator/batch-files/generate.sh index a6aeef91..2610544e 100644 --- a/Source/ImmutablezkEVMAPI/openapi-generator/batch-files/generate.sh +++ b/Source/ImmutablezkEVMAPI/openapi-generator/batch-files/generate.sh @@ -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 \ No newline at end of file +$OPENAPI_GENERATOR_CLI generate "$GENERATOR" "$TEMPLATE" "$INPUT" "$OUTPUT" "$ADDITIONAL_PROPERTIES" \ No newline at end of file