Skip to content

Commit

Permalink
fix: DX-3061 fix passport sample app deployment (#2040)
Browse files Browse the repository at this point in the history
  • Loading branch information
shineli1984 authored Jul 31, 2024
1 parent 1bd9673 commit 1a7211b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/passport-sdk-sample-app-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
- name: setup
uses: ./.github/actions/setup

- name: Update SDK version
run: yarn workspace @imtbl/passport-sdk-sample-app update-sdk-version

- name: Export Passport sample app
run: yarn nx run @imtbl/passport-sdk-sample-app:export

- name: Update SDK version
run: yarn workspace @imtbl/passport-sdk-sample-app update-sdk-version

- name: Upload to S3
run: |
aws s3 sync ./packages/passport/sdk-sample-app/out s3://imx-passport-frontend-prod/sdk-sample-app
Expand Down
2 changes: 1 addition & 1 deletion packages/passport/sdk-sample-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"export": "next export",
"lint": "eslint ./src --ext .ts --max-warnings=0",
"start": "next start",
"update-sdk-version": "scripts/updateSdkVersion.sh ../../internal/generated-clients/src/config/config.ts"
"update-sdk-version": "scripts/updateSdkVersion.sh ./out"
}
}
6 changes: 4 additions & 2 deletions packages/passport/sdk-sample-app/scripts/updateSdkVersion.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s/__SDK_VERSION__/$(git describe --tags --abbrev=0)/g" $1
find $1 -type f -name "*.js" -exec sed -i '' "s/__SDK_VERISON__/$(git describe --tags --abbrev=0)/g" {} +;
else
sed -i "s/__SDK_VERSION__/$(git describe --tags --abbrev=0)/g" $1
find $1 -type f -name "*.js" -exec sed -i "s/__SDK_VERISON__/$(git describe --tags --abbrev=0)/g" {} +;
fi

0 comments on commit 1a7211b

Please sign in to comment.