mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-01 08:06:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e035f3011 | ||
|
|
e04bea451a | ||
|
|
5cb28f5d5d |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bulwark-mobile",
|
||||
"version": "0.1.59",
|
||||
"version": "0.1.61",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bulwark-mobile",
|
||||
"version": "0.1.59",
|
||||
"version": "0.1.61",
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@react-native-async-storage/async-storage": "2.2.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bulwark-mobile",
|
||||
"version": "0.1.59",
|
||||
"version": "0.1.61",
|
||||
"license": "AGPL-3.0-only",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
|
||||
@@ -14,6 +14,18 @@ const git = (...args) =>
|
||||
const gitInherit = (...args) =>
|
||||
execFileSync('git', args, { cwd: root, stdio: 'inherit' });
|
||||
|
||||
// Pre-flight: the release is created with the GitHub CLI as the last step.
|
||||
// Check it is installed and logged in BEFORE anything is committed, tagged or
|
||||
// pushed - otherwise a missing login leaves a pushed tag with no release (and
|
||||
// no release workflow run), which is exactly what a re-run cannot repair.
|
||||
try {
|
||||
execFileSync('gh', ['auth', 'status'], { cwd: root, stdio: 'ignore' });
|
||||
} catch {
|
||||
console.error('GitHub CLI is not available or not logged in.');
|
||||
console.error('Run `gh auth login` (or set GH_TOKEN), then re-run `npm run bump`.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const dirty = git('status', '--porcelain');
|
||||
if (dirty) {
|
||||
console.error('Working tree is not clean. Commit or stash changes before bumping.');
|
||||
@@ -54,10 +66,16 @@ gitInherit('commit', '-m', `chore: update version number to ${next}`);
|
||||
gitInherit('tag', '-a', next, '-m', next);
|
||||
gitInherit('push', '--follow-tags');
|
||||
|
||||
execFileSync(
|
||||
'gh',
|
||||
['release', 'create', next, '--title', next, '--generate-notes'],
|
||||
{ cwd: root, stdio: 'inherit' },
|
||||
);
|
||||
try {
|
||||
execFileSync(
|
||||
'gh',
|
||||
['release', 'create', next, '--title', next, '--generate-notes'],
|
||||
{ cwd: root, stdio: 'inherit' },
|
||||
);
|
||||
} catch {
|
||||
console.error(`The tag ${next} is pushed but the GitHub release could not be created.`);
|
||||
console.error(`Fix the GitHub CLI login and run: gh release create ${next} --title ${next} --generate-notes`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`Released ${next}`);
|
||||
|
||||
Reference in New Issue
Block a user