Skip to content

Commit

Permalink
fix: correct release format
Browse files Browse the repository at this point in the history
  • Loading branch information
sylc committed Jun 2, 2024
1 parent 168201c commit 2097c8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
24 changes: 12 additions & 12 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ await new Command()
try {
await plugin.setup(log);
} catch (err) {
log.critical(err.message);
log.critical(err);
Deno.exit(1);
}
}
Expand All @@ -172,7 +172,7 @@ await new Command()
} catch (err) {
console.log(err);
fetch.fail();
log.critical(err.message);
log.critical(err);
Deno.exit(1);
}
fetch.succeed("Project loaded correctly");
Expand Down Expand Up @@ -212,15 +212,15 @@ await new Command()
log,
);
} catch (err) {
log.critical(err.message);
log.critical(err);
Deno.exit(1);
}
}

try {
repo = await fetchRepo(Deno.cwd());
} catch (err) {
log.critical(err.message);
log.critical(err);
Deno.exit(1);
}

Expand All @@ -231,19 +231,19 @@ await new Command()
).start();
if (!opts.dry) {
try {
await ezgit(repo.path, "add -A");
await ezgit(repo.path, [
ezgit(repo.path, "add -A");
ezgit(repo.path, [
"commit",
"--allow-empty",
"--message",
`chore: release ${to}`,
`chore: release ${semver.format(to)}`,
]);
await ezgit(repo.path, `tag ${to}`);
await ezgit(repo.path, "push");
await ezgit(repo.path, "push --tags");
ezgit(repo.path, `tag ${semver.format(to)}`);
ezgit(repo.path, "push");
ezgit(repo.path, "push --tags");
} catch (err) {
bump.fail(`Unable to release ${colors.bold(semver.format(to))}\n`);
log.critical(err.message);
log.critical(err);
Deno.exit(1);
}
bump.succeed(`Released ${colors.bold(semver.format(to))}!`);
Expand All @@ -270,7 +270,7 @@ await new Command()
log,
);
} catch (err) {
log.critical(err.message);
log.critical(err);
Deno.exit(1);
}
}
Expand Down
6 changes: 0 additions & 6 deletions tools/.release_up.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
"release": true
},
"regex": [
{
"file": "README.md",
"patterns": [
"(?<=@)(.*)(?=\/cli)"
]
},
{
"file": "deno.json",
"patterns": [
Expand Down

0 comments on commit 2097c8e

Please sign in to comment.