We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71e4102 commit de6e103Copy full SHA for de6e103
scripts/capacitor/build-android.mjs
@@ -1,5 +1,7 @@
1
import dotenv from 'dotenv'
2
import { $ } from 'execa'
3
+import { renameSync } from 'fs'
4
+import { readFileSync } from 'fs'
5
6
dotenv.config({
7
path: 'capacitor.env'
@@ -22,4 +24,11 @@ async function run() {
22
24
'--signing-type apksigner'
23
25
]
26
await $$`cap build android ${buildArgs}`
27
+
28
29
+ const version = JSON.parse(readFileSync('package.json', 'utf-8')).version
30
+ const src = 'android/app/build/outputs/apk/release/app-release-signed.apk'
31
+ const dest = `android/app/build/outputs/apk/release/ADAMANT.Messenger-${version}-signed.apk`
32
33
+ renameSync(src, dest)
34
}
0 commit comments