Skip to content

Commit

Permalink
💚 (llm): CI script replace assets
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabbech-ledger committed Jul 9, 2024
1 parent 2771f22 commit b3654ae
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/build-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
submodules: recursive
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
- name: Setup the caches
Expand Down Expand Up @@ -72,6 +73,8 @@ jobs:
env:
VERSION: ${{ steps.version.outputs.clean }}-sha.${{ steps.slug.outputs.sha8 }}
run: cd apps/ledger-live-mobile && npm version $VERSION
- name: Replace assets
run: pnpm mobile assets:replace
- name: build the app
env:
ANDROID_KEYSTORE_PASS: staging
Expand Down Expand Up @@ -113,6 +116,8 @@ jobs:
turbo-server-token: ${{ secrets.TURBOREPO_SERVER_TOKEN }}
- name: install dependencies
run: pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm
- name: Replace assets
run: pnpm mobile assets:replace
- name: bundle ios and android js
run: |
pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
Expand Down
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"download-hermes-profile": "zx ./scripts/download-hermes-profile.mjs",
"e2e:loadConfig": "ts-node ./e2e/bridge/start-server.ts",
"check": "pnpm lint; pnpm typecheck",
"unimported": "unimported"
"unimported": "unimported",
"assets:replace": "zx ./scripts/replace-assets.mjs"
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
Expand Down
14 changes: 14 additions & 0 deletions apps/ledger-live-mobile/scripts/replace-assets.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env zx
import "zx/globals";
import fs from "fs";
import path from "path";

const rootPath = path.join(__dirname, "..", "..", "..");
const basePath = path.join(__dirname, "..");
const replaceAssetsPath = path.join(rootPath, "ledger-live-internal-assets", "apps", "ledger-live-mobile");

async function replaceAssets(){
await fs.promises.cp(replaceAssetsPath, basePath, { recursive: true, force: true});
}

await replaceAssets();

0 comments on commit b3654ae

Please sign in to comment.