mobile-app-builder 0.1.0 → 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 +1 -1
- package/dist/commands/upload.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Mobile App Builder
|
|
1
|
+
# Mobile App Builder
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/js/mobile-app-builder)
|
|
4
4
|
[](https://www.npmjs.com/package/mobile-app-builder)
|
package/dist/commands/upload.js
CHANGED
|
@@ -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}!`));
|
package/package.json
CHANGED