expo-release-it 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/build/command/build.js +87 -54
- package/build/command/build.js.map +1 -1
- package/build/command/bump.js +6 -6
- package/build/command/bump.js.map +1 -1
- package/build/command/init.js +7 -7
- package/build/command/init.js.map +1 -1
- package/build/command/pull.js +88 -45
- package/build/command/pull.js.map +1 -1
- package/build/command/submit.js +83 -45
- package/build/command/submit.js.map +1 -1
- package/build/command/upload.js +83 -45
- package/build/command/upload.js.map +1 -1
- package/build/index.js +110 -70
- package/build/index.js.map +1 -1
- package/build/util/FastlaneOption.js +7 -6
- package/build/util/FastlaneOption.js.map +1 -1
- package/build/util/MetadataSyncUtil.d.ts +4 -0
- package/build/util/MetadataSyncUtil.js +140 -0
- package/build/util/MetadataSyncUtil.js.map +1 -0
- package/build/util/OptionHolder.d.ts +1 -1
- package/build/util/OptionHolder.js +2 -2
- package/build/util/OptionHolder.js.map +1 -1
- package/build/util/generateAppStoreConnectApiKeyFile.js +2 -2
- package/build/util/generateAppStoreConnectApiKeyFile.js.map +1 -1
- package/build/util/injectTemplatePlaceHolders.js +12 -21
- package/build/util/injectTemplatePlaceHolders.js.map +1 -1
- package/build/util/input/InqueryInputs.js +2 -2
- package/build/util/input/InqueryInputs.js.map +1 -1
- package/build/util/setup/VersionUtil.js +2 -2
- package/build/util/setup/VersionUtil.js.map +1 -1
- package/build/util/setup/hydrateKeyholderFileValues.js +2 -2
- package/build/util/setup/hydrateKeyholderFileValues.js.map +1 -1
- package/build/util/setup/prepareAndroid.js +41 -27
- package/build/util/setup/prepareAndroid.js.map +1 -1
- package/build/util/setup/prepareIos.js +46 -26
- package/build/util/setup/prepareIos.js.map +1 -1
- package/build/util/setup/setup.js +6 -6
- package/build/util/setup/setup.js.map +1 -1
- package/package.json +1 -1
- package/template/android/fastlane/Fastfile +2 -0
- package/template/android/fastlane/Appfile +0 -2
- package/template/android/fastlane/metadata/android/ko-KR/changelogs/default.txt +0 -1
- package/template/android/fastlane/metadata/android/ko-KR/full_description.txt +0 -0
- package/template/android/fastlane/metadata/android/ko-KR/short_description.txt +0 -0
- package/template/android/fastlane/metadata/android/ko-KR/title.txt +0 -0
- package/template/android/fastlane/metadata/android/ko-KR/video.txt +0 -0
- package/template/ios/fastlane/metadata/copyright.txt +0 -0
- package/template/ios/fastlane/metadata/ko/apple_tv_privacy_policy.txt +0 -0
- package/template/ios/fastlane/metadata/ko/description.txt +0 -0
- package/template/ios/fastlane/metadata/ko/keywords.txt +0 -0
- package/template/ios/fastlane/metadata/ko/marketing_url.txt +0 -0
- package/template/ios/fastlane/metadata/ko/name.txt +0 -0
- package/template/ios/fastlane/metadata/ko/privacy_url.txt +0 -0
- package/template/ios/fastlane/metadata/ko/promotional_text.txt +0 -0
- package/template/ios/fastlane/metadata/ko/release_notes.txt +0 -0
- package/template/ios/fastlane/metadata/ko/subtitle.txt +0 -0
- package/template/ios/fastlane/metadata/ko/support_url.txt +0 -0
- package/template/ios/fastlane/metadata/primary_category.txt +0 -0
- package/template/ios/fastlane/metadata/primary_first_sub_category.txt +0 -1
- package/template/ios/fastlane/metadata/primary_second_sub_category.txt +0 -1
- package/template/ios/fastlane/metadata/review_information/demo_password.txt +0 -0
- package/template/ios/fastlane/metadata/review_information/demo_user.txt +0 -0
- package/template/ios/fastlane/metadata/review_information/email_address.txt +0 -0
- package/template/ios/fastlane/metadata/review_information/first_name.txt +0 -0
- package/template/ios/fastlane/metadata/review_information/last_name.txt +0 -0
- package/template/ios/fastlane/metadata/review_information/notes.txt +0 -1
- package/template/ios/fastlane/metadata/review_information/phone_number.txt +0 -0
- package/template/ios/fastlane/metadata/secondary_category.txt +0 -1
- package/template/ios/fastlane/metadata/secondary_first_sub_category.txt +0 -1
- package/template/ios/fastlane/metadata/secondary_second_sub_category.txt +0 -1
- package/template/ios/fastlane/screenshots/README.txt +0 -30
package/build/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var package_default = {
|
|
|
6
6
|
name: "expo-release-it",
|
|
7
7
|
module: "src/index.ts",
|
|
8
8
|
type: "module",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.2",
|
|
10
10
|
license: "MIT",
|
|
11
11
|
scripts: {
|
|
12
12
|
build: "tsup",
|
|
@@ -56,26 +56,26 @@ import fs from "fs-extra";
|
|
|
56
56
|
import * as path from "path";
|
|
57
57
|
var join2 = path.join;
|
|
58
58
|
var resolve2 = path.resolve;
|
|
59
|
-
function exist(
|
|
60
|
-
return fs.existsSync(
|
|
59
|
+
function exist(path2) {
|
|
60
|
+
return fs.existsSync(path2);
|
|
61
61
|
}
|
|
62
|
-
function isDir(
|
|
63
|
-
return exist(
|
|
62
|
+
function isDir(path2) {
|
|
63
|
+
return exist(path2) && fs.lstatSync(path2).isDirectory();
|
|
64
64
|
}
|
|
65
65
|
function relativePath(from, to) {
|
|
66
66
|
return path.relative(from, to);
|
|
67
67
|
}
|
|
68
|
-
function isFile(
|
|
69
|
-
return exist(
|
|
68
|
+
function isFile(path2) {
|
|
69
|
+
return exist(path2) && fs.lstatSync(path2).isFile();
|
|
70
70
|
}
|
|
71
|
-
function read(
|
|
72
|
-
return fs.readFileSync(
|
|
71
|
+
function read(path2) {
|
|
72
|
+
return fs.readFileSync(path2, { encoding: "utf8" });
|
|
73
73
|
}
|
|
74
|
-
function readdir(
|
|
75
|
-
return fs.readdirSync(
|
|
74
|
+
function readdir(path2) {
|
|
75
|
+
return fs.readdirSync(path2);
|
|
76
76
|
}
|
|
77
|
-
function readJsonSlow(
|
|
78
|
-
return fs.readJSONSync(
|
|
77
|
+
function readJsonSlow(path2) {
|
|
78
|
+
return fs.readJSONSync(path2);
|
|
79
79
|
}
|
|
80
80
|
function write(p, content) {
|
|
81
81
|
const dir = path.dirname(p);
|
|
@@ -87,27 +87,24 @@ function write(p, content) {
|
|
|
87
87
|
function copy(src, dest, options) {
|
|
88
88
|
fs.copySync(src, dest, options);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
90
|
+
function writeJson(path2, json) {
|
|
91
|
+
return write(path2, JSON.stringify(json, null, 2));
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
function remove(path3) {
|
|
97
|
-
if (!exist(path3)) {
|
|
93
|
+
function remove(path2) {
|
|
94
|
+
if (!exist(path2)) {
|
|
98
95
|
return;
|
|
99
96
|
}
|
|
100
|
-
if (fs.lstatSync(
|
|
101
|
-
return fs.rmSync(
|
|
97
|
+
if (fs.lstatSync(path2).isDirectory()) {
|
|
98
|
+
return fs.rmSync(path2, { force: true, recursive: true });
|
|
102
99
|
} else {
|
|
103
|
-
return fs.rmSync(
|
|
100
|
+
return fs.rmSync(path2, { force: true });
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
|
-
async function iterateDir(
|
|
107
|
-
if (!isDir(
|
|
103
|
+
async function iterateDir(path2, fn) {
|
|
104
|
+
if (!isDir(path2)) {
|
|
108
105
|
return;
|
|
109
106
|
}
|
|
110
|
-
for (const file of fs.readdirSync(
|
|
107
|
+
for (const file of fs.readdirSync(path2)) {
|
|
111
108
|
await fn(file);
|
|
112
109
|
}
|
|
113
110
|
}
|
|
@@ -124,7 +121,7 @@ var OptionHolder = {
|
|
|
124
121
|
keyholderMap: {},
|
|
125
122
|
templateDirNames: ["key"],
|
|
126
123
|
projectDir: "",
|
|
127
|
-
|
|
124
|
+
resourcesDir: "",
|
|
128
125
|
keyDir: "",
|
|
129
126
|
keyholderFilePath: "",
|
|
130
127
|
versionName: "",
|
|
@@ -365,10 +362,10 @@ async function setup() {
|
|
|
365
362
|
}
|
|
366
363
|
async function setupBasicOptions() {
|
|
367
364
|
OptionHolder.projectDir = isDev ? resolve2("example") : resolve2(".");
|
|
368
|
-
OptionHolder.
|
|
369
|
-
OptionHolder.keyDir = resolve2(OptionHolder.
|
|
370
|
-
OptionHolder.keyholderFilePath = resolve2(OptionHolder.
|
|
371
|
-
OptionHolder.tempDir = resolve2(OptionHolder.
|
|
365
|
+
OptionHolder.resourcesDir = resolve2(OptionHolder.projectDir, "expo-release-it");
|
|
366
|
+
OptionHolder.keyDir = resolve2(OptionHolder.resourcesDir, "key");
|
|
367
|
+
OptionHolder.keyholderFilePath = resolve2(OptionHolder.resourcesDir, "keyholder.json");
|
|
368
|
+
OptionHolder.tempDir = resolve2(OptionHolder.resourcesDir, ".temp");
|
|
372
369
|
}
|
|
373
370
|
|
|
374
371
|
// src/command/init.ts
|
|
@@ -507,7 +504,7 @@ async function copyTemplates() {
|
|
|
507
504
|
}
|
|
508
505
|
async function copyDirRecursively(dir) {
|
|
509
506
|
const sourceDirPath = join2(OptionHolder.cli.templateDir, dir);
|
|
510
|
-
const destDirPath = join2(OptionHolder.
|
|
507
|
+
const destDirPath = join2(OptionHolder.resourcesDir, dir);
|
|
511
508
|
copy(sourceDirPath, destDirPath, { overwrite: dir !== "key" });
|
|
512
509
|
}
|
|
513
510
|
}
|
|
@@ -574,18 +571,12 @@ async function iterateAllFiles(root, callback) {
|
|
|
574
571
|
}
|
|
575
572
|
|
|
576
573
|
// src/util/injectTemplatePlaceHolders.ts
|
|
577
|
-
import * as path2 from "node:path";
|
|
578
574
|
async function injectTemplatePlaceHolders(root) {
|
|
579
575
|
await iterateAllFiles(root, async (filePath) => {
|
|
580
|
-
const dirPath = path2.dirname(filePath);
|
|
581
576
|
let content = read(filePath);
|
|
582
577
|
for (const [key, value] of Object.entries(OptionHolder.keyholderMap)) {
|
|
583
578
|
content = content.replaceAll(`{{${key}}}`, value);
|
|
584
579
|
}
|
|
585
|
-
content = content.replaceAll(
|
|
586
|
-
"{{key_dir_relative_path}}",
|
|
587
|
-
relativePath(dirPath, OptionHolder.keyDir)
|
|
588
|
-
);
|
|
589
580
|
write(filePath, content);
|
|
590
581
|
});
|
|
591
582
|
}
|
|
@@ -601,6 +592,47 @@ async function spinner(text, promise) {
|
|
|
601
592
|
});
|
|
602
593
|
}
|
|
603
594
|
|
|
595
|
+
// src/util/MetadataSyncUtil.ts
|
|
596
|
+
import chalk5 from "chalk";
|
|
597
|
+
function copyIosMetadata(to) {
|
|
598
|
+
const iosDir = join2(OptionHolder.projectDir, "ios");
|
|
599
|
+
const nativeDir = join2(iosDir, "fastlane");
|
|
600
|
+
const metadataNativeDir = join2(nativeDir, "metadata");
|
|
601
|
+
const screenshotsNativeDir = join2(nativeDir, "screenshots");
|
|
602
|
+
const resourcesDir = join2(OptionHolder.resourcesDir, "metadata/ios");
|
|
603
|
+
const metadataResourcesDir = join2(resourcesDir, "metadata");
|
|
604
|
+
const screenshotsResourcesDir = join2(resourcesDir, "screenshots");
|
|
605
|
+
if (to === "resources") {
|
|
606
|
+
copy(metadataNativeDir, metadataResourcesDir);
|
|
607
|
+
copy(screenshotsNativeDir, screenshotsResourcesDir);
|
|
608
|
+
logger.done(
|
|
609
|
+
`iOS Metadata saved in ${chalk5.inverse(relativePath(OptionHolder.projectDir, resourcesDir))}. You can edit inside contents.`
|
|
610
|
+
);
|
|
611
|
+
} else {
|
|
612
|
+
copy(metadataResourcesDir, metadataNativeDir);
|
|
613
|
+
copy(screenshotsResourcesDir, screenshotsNativeDir);
|
|
614
|
+
logger.done(
|
|
615
|
+
`iOS Metadata copyed to ${chalk5.inverse(relativePath(OptionHolder.projectDir, nativeDir))}`
|
|
616
|
+
);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function copyAndroidMetadata(to) {
|
|
620
|
+
const androidDir = join2(OptionHolder.projectDir, "android");
|
|
621
|
+
const nativeDir = join2(androidDir, "fastlane/metadata/android");
|
|
622
|
+
const resourcesDir = join2(OptionHolder.resourcesDir, "metadata/android");
|
|
623
|
+
if (to === "resouces") {
|
|
624
|
+
copy(nativeDir, resourcesDir);
|
|
625
|
+
logger.done(
|
|
626
|
+
`Android Metadata saved in ${chalk5.inverse(relativePath(OptionHolder.projectDir, resourcesDir))}. You can edit inside contents.`
|
|
627
|
+
);
|
|
628
|
+
} else {
|
|
629
|
+
copy(resourcesDir, nativeDir);
|
|
630
|
+
logger.done(
|
|
631
|
+
`Android Metadata copyed to ${chalk5.inverse(relativePath(OptionHolder.projectDir, nativeDir))}`
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
|
|
604
636
|
// src/util/setup/prepareAndroid.ts
|
|
605
637
|
async function prepareAndroid() {
|
|
606
638
|
const srcDir = resolve2(OptionHolder.cli.templateDir, "android");
|
|
@@ -624,6 +656,7 @@ async function prepareAndroid() {
|
|
|
624
656
|
);
|
|
625
657
|
await exe({ cwd: destDir })`bundle install`;
|
|
626
658
|
logger.success("Bunder Install - Done");
|
|
659
|
+
copyAndroidMetadata("native");
|
|
627
660
|
}
|
|
628
661
|
async function replaceAndroidSigningConfig(destDir) {
|
|
629
662
|
const buildGradleDirPath = resolve2(destDir, "app");
|
|
@@ -638,7 +671,7 @@ async function replaceAndroidSigningConfig(destDir) {
|
|
|
638
671
|
`
|
|
639
672
|
signingConfigs {
|
|
640
673
|
debug {
|
|
641
|
-
storeFile file('${relativePath(buildGradleDirPath, resolve2(OptionHolder.
|
|
674
|
+
storeFile file('${relativePath(buildGradleDirPath, resolve2(OptionHolder.resourcesDir, "key", "android_release_keystore.jks"))}')
|
|
642
675
|
storePassword '${android_keystore_store_password}'
|
|
643
676
|
keyAlias '${android_keystore_key_alias}'
|
|
644
677
|
keyPassword '${android_keystore_key_password}'
|
|
@@ -671,10 +704,11 @@ async function prepareIos() {
|
|
|
671
704
|
);
|
|
672
705
|
await exe({ cwd: destDir })`bundle install`;
|
|
673
706
|
logger.success("Bunder Install - Done");
|
|
707
|
+
copyIosMetadata("native");
|
|
674
708
|
}
|
|
675
709
|
|
|
676
710
|
// src/command/upload.ts
|
|
677
|
-
import
|
|
711
|
+
import chalk6 from "chalk";
|
|
678
712
|
|
|
679
713
|
// src/util/calculateElapsed.ts
|
|
680
714
|
import { padZero } from "@mj-studio/js-util";
|
|
@@ -689,11 +723,12 @@ function calculateElapsed(t) {
|
|
|
689
723
|
function getAndroidFastlaneOptions() {
|
|
690
724
|
return [
|
|
691
725
|
...Object.entries(OptionHolder.keyholderMap).map(([k, v]) => `${k}:${v}`),
|
|
726
|
+
`json_key:${resolve2(OptionHolder.keyDir, "android_play_console_service_account.json")}`,
|
|
692
727
|
`version_name:${OptionHolder.versionName}`,
|
|
693
728
|
`version_code:${OptionHolder.versionCode}`,
|
|
694
729
|
`upload_metadata:${OptionHolder.input.uploadMetadata}`,
|
|
695
|
-
`aab_path:${resolve2(OptionHolder.
|
|
696
|
-
`apk_path:${resolve2(OptionHolder.
|
|
730
|
+
`aab_path:${resolve2(OptionHolder.resourcesDir, "output", "android", "aab", "app-release.aab")}`,
|
|
731
|
+
`apk_path:${resolve2(OptionHolder.resourcesDir, "output", "android", "apk", "app-release.apk")}`,
|
|
697
732
|
`skip_upload_apk:${OptionHolder.input.androidOutput !== "apk"}`,
|
|
698
733
|
`skip_upload_aab:${OptionHolder.input.androidOutput !== "aab"}`
|
|
699
734
|
];
|
|
@@ -705,8 +740,8 @@ function getIosFastlaneOptions() {
|
|
|
705
740
|
`version_code:${OptionHolder.versionCode}`,
|
|
706
741
|
`api_key_filepath:${resolve2(OptionHolder.keyDir, "ios_testflight_upload_api_key.p8")}`,
|
|
707
742
|
`upload_metadata:${OptionHolder.input.uploadMetadata}`,
|
|
708
|
-
`ipa_path:${resolve2(OptionHolder.
|
|
709
|
-
`ipa_dir:${resolve2(OptionHolder.
|
|
743
|
+
`ipa_path:${resolve2(OptionHolder.resourcesDir, "output", "ios", "app.ipa")}`,
|
|
744
|
+
`ipa_dir:${resolve2(OptionHolder.resourcesDir, "output", "ios")}`,
|
|
710
745
|
`ipa_name:app.ipa`
|
|
711
746
|
];
|
|
712
747
|
}
|
|
@@ -721,10 +756,10 @@ async function upload({ options }) {
|
|
|
721
756
|
logger.info(`Version: ${OptionHolder.versionName}(${OptionHolder.versionCode})`);
|
|
722
757
|
if (OptionHolder.input.platform === "ios") {
|
|
723
758
|
await uploadIos();
|
|
724
|
-
logger.success(`iOS Upload ${
|
|
759
|
+
logger.success(`iOS Upload ${chalk6.bold.inverse(calculateElapsed(startTime))}`);
|
|
725
760
|
} else {
|
|
726
761
|
await uploadAndroid();
|
|
727
|
-
logger.success(`Android Upload ${
|
|
762
|
+
logger.success(`Android Upload ${chalk6.bold.inverse(calculateElapsed(startTime))}`);
|
|
728
763
|
}
|
|
729
764
|
}
|
|
730
765
|
async function promptInputs2() {
|
|
@@ -761,7 +796,7 @@ async function uploadAndroid() {
|
|
|
761
796
|
}
|
|
762
797
|
|
|
763
798
|
// src/command/submit.ts
|
|
764
|
-
import
|
|
799
|
+
import chalk7 from "chalk";
|
|
765
800
|
async function submit({ options }) {
|
|
766
801
|
Object.assign(OptionHolder.input, options);
|
|
767
802
|
const startTime = Date.now();
|
|
@@ -771,10 +806,10 @@ async function submit({ options }) {
|
|
|
771
806
|
logger.info(`Version: ${OptionHolder.versionName}(${OptionHolder.versionCode})`);
|
|
772
807
|
if (OptionHolder.input.platform === "ios") {
|
|
773
808
|
await submitIos();
|
|
774
|
-
logger.success(`Appstore Review Submitted ${
|
|
809
|
+
logger.success(`Appstore Review Submitted ${chalk7.bold.inverse(calculateElapsed(startTime))}`);
|
|
775
810
|
} else {
|
|
776
811
|
await submitAndroid();
|
|
777
|
-
logger.success(`Playstore Review Submitted ${
|
|
812
|
+
logger.success(`Playstore Review Submitted ${chalk7.bold.inverse(calculateElapsed(startTime))}`);
|
|
778
813
|
}
|
|
779
814
|
}
|
|
780
815
|
async function promptInputs3() {
|
|
@@ -803,7 +838,7 @@ async function submitIos() {
|
|
|
803
838
|
}
|
|
804
839
|
|
|
805
840
|
// src/command/build.ts
|
|
806
|
-
import
|
|
841
|
+
import chalk8 from "chalk";
|
|
807
842
|
async function build({ options }) {
|
|
808
843
|
Object.assign(OptionHolder.input, options);
|
|
809
844
|
const startTime = Date.now();
|
|
@@ -813,10 +848,10 @@ async function build({ options }) {
|
|
|
813
848
|
logger.info(`Version: ${OptionHolder.versionName}(${OptionHolder.versionCode})`);
|
|
814
849
|
if (OptionHolder.input.platform === "ios") {
|
|
815
850
|
await buildIos();
|
|
816
|
-
logger.success(`iOS Build ${
|
|
851
|
+
logger.success(`iOS Build ${chalk8.bold.inverse(calculateElapsed(startTime))}`);
|
|
817
852
|
} else {
|
|
818
853
|
await buildAndroid();
|
|
819
|
-
logger.success(`Android Build ${
|
|
854
|
+
logger.success(`Android Build ${chalk8.bold.inverse(calculateElapsed(startTime))}`);
|
|
820
855
|
}
|
|
821
856
|
}
|
|
822
857
|
async function promptInputs4() {
|
|
@@ -842,7 +877,7 @@ async function buildIos() {
|
|
|
842
877
|
remove(resolve2(iosDir, ".xcode.env.local"));
|
|
843
878
|
await exeEnv("bundle", ["exec", "fastlane", "build", ...getIosFastlaneOptions()]);
|
|
844
879
|
logger.success(
|
|
845
|
-
`artifact generated: ${relativePath(OptionHolder.projectDir, resolve2(OptionHolder.
|
|
880
|
+
`artifact generated: ${relativePath(OptionHolder.projectDir, resolve2(OptionHolder.resourcesDir, "output", "ios", "app.ipa"))}`
|
|
846
881
|
);
|
|
847
882
|
}
|
|
848
883
|
}
|
|
@@ -857,19 +892,15 @@ async function buildAndroid() {
|
|
|
857
892
|
let buildOutputDir;
|
|
858
893
|
let outputDir;
|
|
859
894
|
if (OptionHolder.input.androidOutput === "aab") {
|
|
860
|
-
await
|
|
861
|
-
|
|
862
|
-
exeEnv(isWin ? "gradle.bat" : "./gradlew", ["app:bundleRelease"])
|
|
863
|
-
);
|
|
895
|
+
await exeEnv(isWin ? "gradle.bat" : "./gradlew", ["app:bundleRelease"]);
|
|
896
|
+
logger.done("Bundle AAB");
|
|
864
897
|
buildOutputDir = resolve2(androidDir, "app", "build", "outputs", "bundle", "release");
|
|
865
|
-
outputDir = resolve2(OptionHolder.
|
|
898
|
+
outputDir = resolve2(OptionHolder.resourcesDir, "output", "android", "aab");
|
|
866
899
|
} else {
|
|
867
|
-
await
|
|
868
|
-
|
|
869
|
-
exeEnv(isWin ? "gradle.bat" : "./gradlew", ["app:assembleRelease"])
|
|
870
|
-
);
|
|
900
|
+
await exeEnv(isWin ? "gradle.bat" : "./gradlew", ["app:assembleRelease"]);
|
|
901
|
+
logger.done("Assemble APK");
|
|
871
902
|
buildOutputDir = resolve2(androidDir, "app", "build", "outputs", "apk", "release");
|
|
872
|
-
outputDir = resolve2(OptionHolder.
|
|
903
|
+
outputDir = resolve2(OptionHolder.resourcesDir, "output", "android", "apk");
|
|
873
904
|
}
|
|
874
905
|
remove(outputDir);
|
|
875
906
|
copy(buildOutputDir, outputDir);
|
|
@@ -930,17 +961,26 @@ async function pullIosMetadata() {
|
|
|
930
961
|
"--api_key_path",
|
|
931
962
|
generateAppStoreConnectApiKeyFile()
|
|
932
963
|
]);
|
|
933
|
-
|
|
934
|
-
const screenshotsSrcDir = join2(iosDir, "fastlane/screenshots");
|
|
935
|
-
const metadataDestDir = join2(OptionHolder.outputOfInitDir, "metadata/ios/metadata");
|
|
936
|
-
const screenshotsDestDir = join2(OptionHolder.outputOfInitDir, "metadata/ios/screenshots");
|
|
937
|
-
move(metadataSrcDir, metadataDestDir);
|
|
938
|
-
move(screenshotsSrcDir, screenshotsDestDir);
|
|
964
|
+
copyIosMetadata("resources");
|
|
939
965
|
}
|
|
940
966
|
async function pullAndroidMetadata() {
|
|
941
967
|
await prepareAndroid();
|
|
942
968
|
const androidDir = join2(OptionHolder.projectDir, "android");
|
|
943
|
-
await exe(
|
|
969
|
+
await exe(
|
|
970
|
+
"bundle",
|
|
971
|
+
[
|
|
972
|
+
"exec",
|
|
973
|
+
"fastlane",
|
|
974
|
+
"supply",
|
|
975
|
+
"init",
|
|
976
|
+
"--json_key",
|
|
977
|
+
resolve2(OptionHolder.keyDir, "android_play_console_service_account.json"),
|
|
978
|
+
"--package_name",
|
|
979
|
+
OptionHolder.keyholderMap.android_package_name
|
|
980
|
+
],
|
|
981
|
+
{ cwd: androidDir }
|
|
982
|
+
);
|
|
983
|
+
copyAndroidMetadata("resouces");
|
|
944
984
|
}
|
|
945
985
|
|
|
946
986
|
// src/index.ts
|