Add script to inject iOS app ID to public/.well-known/apple-app-site-association (#66)
* Add script to inject iOS app ID to public/.well-known/apple-app-site-association * package.json * Fix typo * Fix typo * Fix build * Debug * Updated to use "dist" folder
This commit is contained in:
parent
67ecbd75b4
commit
f9e301b3f0
2
.github/workflows/deploy-testnet.yml
vendored
2
.github/workflows/deploy-testnet.yml
vendored
@ -33,11 +33,13 @@ jobs:
|
||||
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
|
||||
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
|
||||
STATUS_PAGE_SCRIPT_URI: ${{ secrets.STATUS_PAGE_SCRIPT_URI }}
|
||||
IOS_APP_ID: ${{ secrets.IOS_APP_ID }}
|
||||
run: |
|
||||
pnpm run build
|
||||
pnpm run build:inject-amplitude
|
||||
pnpm run build:inject-bugsnag
|
||||
pnpm run build:inject-statuspage
|
||||
sh scripts/inject-app-deeplinks.sh
|
||||
|
||||
- name: Upload to IPFS via web3.storage
|
||||
uses: dydxprotocol/add-to-web3@v1
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"build:inject-app-deeplinks": "sh scripts/inject-app-deeplinks.sh",
|
||||
"build:inject-amplitude": "node scripts/inject-amplitude.js",
|
||||
"build:inject-bugsnag": "node scripts/inject-bugsnag.js",
|
||||
"build:inject-statuspage": "node scripts/inject-statuspage.js",
|
||||
|
||||
19
scripts/inject-app-deeplinks.sh
Executable file
19
scripts/inject-app-deeplinks.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
source="dist/.well-known/apple-app-site-association"
|
||||
if [ ! -f "$source" ]; then
|
||||
echo "Error: $source file not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
app_id=$IOS_APP_ID
|
||||
if [ -z "$app_id" ]; then
|
||||
echo "Error: IOS_APP_ID is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' "s/{PLACE_YOUR_APP_ID_HERE}/$app_id/g" $source
|
||||
else
|
||||
sed -i "s/{PLACE_YOUR_APP_ID_HERE}/$app_id/g" $source
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user