mobile-app-builder 0.0.1 → 1.0.1

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 CHANGED
@@ -1,4 +1,4 @@
1
- # Mobile App Builder (`mobile-app-builder`)
1
+ # Mobile App Builder
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/mobile-app-builder.svg)](https://badge.fury.io/js/mobile-app-builder)
4
4
  [![npm downloads](https://img.shields.io/npm/dt/mobile-app-builder.svg)](https://www.npmjs.com/package/mobile-app-builder)
@@ -112,7 +112,7 @@ async function buildAndroid(options) {
112
112
  await (0, signing_js_1.signArtifact)(outputName, outDir, isAab, appName);
113
113
  const tag = `v${appVersion}${profile ? "-" + profile : ""}`;
114
114
  const isPrerelease = profile !== "prod";
115
- const published = await (0, github_js_1.publishGitHubRelease)(tag, destPath, tag, options.notes || "", fullProfileName, isPrerelease);
115
+ const published = await (0, github_js_1.publishGitHubRelease)(tag, destPath, tag, options.notes || ("Release " + tag), fullProfileName, isPrerelease);
116
116
  if (options.publish && isAab && published) {
117
117
  await (0, github_js_1.triggerGitHubWorkflow)(tag, options.track);
118
118
  }
@@ -63,10 +63,7 @@ async function uploadCommand(fileArg, options = {}) {
63
63
  process.exit(1);
64
64
  }
65
65
  const title = options.title || tag;
66
- const notes = options.notes || "";
67
- const isPrerelease = options.prerelease !== undefined
68
- ? options.prerelease
69
- : tag.includes("-dev") || tag.includes("-preview");
66
+ const notes = options.notes || `Release ${tag}`;
70
67
  console.log(chalk_1.default.cyan(`\nUploading ${filename} to GitHub Release '${tag}'...`));
71
68
  try {
72
69
  let releaseExists = false;
@@ -83,6 +80,12 @@ async function uploadCommand(fileArg, options = {}) {
83
80
  }
84
81
  else {
85
82
  console.log(chalk_1.default.yellow(`Creating new release '${tag}' and uploading asset...`));
83
+ try {
84
+ await (0, execa_1.execa)("git", ["push", "origin", tag]);
85
+ }
86
+ catch (e) {
87
+ // Ignore if the tag doesn't exist locally or if push fails
88
+ }
86
89
  const createArgs = [
87
90
  "release",
88
91
  "create",
@@ -91,9 +94,6 @@ async function uploadCommand(fileArg, options = {}) {
91
94
  `--title=${title}`,
92
95
  `--notes=${notes}`,
93
96
  ];
94
- if (isPrerelease) {
95
- createArgs.push("--prerelease");
96
- }
97
97
  await (0, execa_1.execa)("gh", createArgs, { stdio: "inherit" });
98
98
  }
99
99
  console.log(chalk_1.default.green(`\n✓ Successfully uploaded ${filename} to release ${tag}!`));
@@ -180,7 +180,7 @@ async function publishGitHubRelease(tag, assetPath, title, notes, profileName, p
180
180
  tag,
181
181
  assetPath,
182
182
  `--title=${title}`,
183
- `--notes=${notes}`,
183
+ `--notes=${notes || ("Release " + tag)}`,
184
184
  ];
185
185
  if (prerelease) {
186
186
  createArgs.push("--prerelease");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobile-app-builder",
3
- "version": "0.0.1",
3
+ "version": "1.0.1",
4
4
  "description": "Cross-platform CLI builder and signer for mobile applications (Expo, React Native, and Android projects)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -59,4 +59,4 @@
59
59
  "url": "https://github.com/georgechitechi/mobile-app-builder/issues"
60
60
  },
61
61
  "homepage": "https://github.com/georgechitechi/mobile-app-builder#readme"
62
- }
62
+ }