From 836e97ddd8412209a0e22f9eee7e1014f43cfee6 Mon Sep 17 00:00:00 2001 From: vorujack Date: Tue, 20 Aug 2024 12:18:49 +0330 Subject: [PATCH] fix build process --- .github/workflows/release-android.yaml | 12 ++++---- .github/workflows/release-desktop.yaml | 6 ++-- .../AppIcon.appiconset/Contents.json | 16 +++++------ .../ios/App/App/Assets.xcassets/Contents.json | 8 +++--- .../Splash.imageset/Contents.json | 28 +++++++++---------- apps/wallet/tsconfig.json | 2 +- apps/wallet/tsconfig.node.json | 4 +-- cli/update_version.js | 5 +++- 8 files changed, 41 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release-android.yaml b/.github/workflows/release-android.yaml index 5b84370..9b8a883 100644 --- a/.github/workflows/release-android.yaml +++ b/.github/workflows/release-android.yaml @@ -39,18 +39,18 @@ jobs: - name: Build Minotaur JS app and update capacitor shell: bash - run: npm run sync + run: npm run sync --prefix apps/wallet/ - name: Setup Android build environment uses: android-actions/setup-android@v3 - name: Grant execute permission for gradlew - run: chmod +x ./android/gradlew + run: chmod +x .apps/wallet/android/gradlew - name: Update AndroidManifest.xml uses: damienaicheh/update-android-version-manifest-action@v1.0.0 with: - android-manifest-path: './android/app/src/main/AndroidManifest.xml' + android-manifest-path: '.apps/wallet/android/app/src/main/AndroidManifest.xml' version-code: ${{ env.NUMBER_OF_COMMITS }} version-name: '${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}${{ env.PRE_RELEASE }}' print-file: true @@ -58,13 +58,13 @@ jobs: - name: Update gradle version for Android uses: damienaicheh/update-android-version-gradle-action@v1.0.0 with: - build-gradle-path: './android/app/build.gradle' + build-gradle-path: '.apps/wallet/android/app/build.gradle' version-code: ${{ env.NUMBER_OF_COMMITS }} version-name: '${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}${{ env.PRE_RELEASE }}' print-file: true - name: Build app bundle - working-directory: android + working-directory: apps/wallet/android run: ./gradlew clean app:assembleRelease - uses: r0adkll/sign-android-release@v1 @@ -74,7 +74,7 @@ jobs: env: BUILD_TOOLS_VERSION: 34.0.0 with: - releaseDirectory: android/app/build/outputs/apk/release + releaseDirectory: apps/wallet/android/app/build/outputs/apk/release signingKeyBase64: ${{ secrets.SIGNING_KEYSTORE }} alias: ${{ secrets.SIGNING_KEY_ALIAS }} keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }} diff --git a/.github/workflows/release-desktop.yaml b/.github/workflows/release-desktop.yaml index 6e20a8e..bf5cdb7 100644 --- a/.github/workflows/release-desktop.yaml +++ b/.github/workflows/release-desktop.yaml @@ -54,14 +54,14 @@ jobs: - name: Build Minotaur JS app and update capacitor shell: bash - run: npm run sync:electron + run: npm run sync:electron --prefix apps/wallet/ - name: Remove icns from assets if: matrix.platform != 'MacOS' - run: rm electron/assets/appIcon.icns + run: rm apps/wallet/electron/assets/appIcon.icns - name: Build Electron - working-directory: ./electron + working-directory: .apps/wallet/electron run: npm i; npm run electron:make - name: Upload Executable File to release diff --git a/apps/wallet/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/apps/wallet/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json index 9b7d382..00b5bd3 100644 --- a/apps/wallet/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/apps/wallet/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,14 +1,14 @@ { - "images" : [ + "images": [ { - "filename" : "AppIcon-512@2x.png", - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" + "filename": "AppIcon-512@2x.png", + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" } ], - "info" : { - "author" : "xcode", - "version" : 1 + "info": { + "author": "xcode", + "version": 1 } } diff --git a/apps/wallet/ios/App/App/Assets.xcassets/Contents.json b/apps/wallet/ios/App/App/Assets.xcassets/Contents.json index da4a164..97a8662 100644 --- a/apps/wallet/ios/App/App/Assets.xcassets/Contents.json +++ b/apps/wallet/ios/App/App/Assets.xcassets/Contents.json @@ -1,6 +1,6 @@ { - "info" : { - "version" : 1, - "author" : "xcode" + "info": { + "version": 1, + "author": "xcode" } -} \ No newline at end of file +} diff --git a/apps/wallet/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json b/apps/wallet/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json index d7d96a6..b781492 100644 --- a/apps/wallet/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +++ b/apps/wallet/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json @@ -1,23 +1,23 @@ { - "images" : [ + "images": [ { - "idiom" : "universal", - "filename" : "splash-2732x2732-2.png", - "scale" : "1x" + "idiom": "universal", + "filename": "splash-2732x2732-2.png", + "scale": "1x" }, { - "idiom" : "universal", - "filename" : "splash-2732x2732-1.png", - "scale" : "2x" + "idiom": "universal", + "filename": "splash-2732x2732-1.png", + "scale": "2x" }, { - "idiom" : "universal", - "filename" : "splash-2732x2732.png", - "scale" : "3x" + "idiom": "universal", + "filename": "splash-2732x2732.png", + "scale": "3x" } ], - "info" : { - "version" : 1, - "author" : "xcode" + "info": { + "version": 1, + "author": "xcode" } -} \ No newline at end of file +} diff --git a/apps/wallet/tsconfig.json b/apps/wallet/tsconfig.json index 38377b7..2715080 100644 --- a/apps/wallet/tsconfig.json +++ b/apps/wallet/tsconfig.json @@ -28,5 +28,5 @@ } }, "include": ["src"], - "references": [{ "path": "./tsconfig.node.json"}] + "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/apps/wallet/tsconfig.node.json b/apps/wallet/tsconfig.node.json index 3901a85..cfa1ab5 100644 --- a/apps/wallet/tsconfig.node.json +++ b/apps/wallet/tsconfig.node.json @@ -6,7 +6,5 @@ "moduleResolution": "node", "allowSyntheticDefaultImports": true }, - "include": [ - "vite.config.ts" - ] + "include": ["vite.config.ts"] } diff --git a/cli/update_version.js b/cli/update_version.js index 59e10dd..9b87268 100644 --- a/cli/update_version.js +++ b/cli/update_version.js @@ -7,7 +7,10 @@ async function main() { if (process.argv.length < 3) { throw Error('No version specified'); } - for (let file_path of ['package.json', 'electron/package.json']) { + for (let file_path of [ + 'apps/wallet/package.json', + 'apps/wallet/electron/package.json', + ]) { let data = fs.readFileSync(file_path, 'utf8'); let root = JSON.parse(data); root.version = process.argv[2];