Release v1.5.0 #8

Merged
CTO merged 4 commits from develop into main 2023-08-23 19:47:45 +00:00
Showing only changes of commit 92f8126abf - Show all commits

View File

@@ -51,8 +51,10 @@ program
.command("commit")
.description("Create a conventional commit")
.option("-S, --sign", "sign the commit")
.option("--amend", "amend commit message to the last commit")
.action(async (options) => {
const sign = options.sign ? true : false;
const amend = options.amend ? true : false;
const config = await GetConfig();
@@ -63,7 +65,9 @@ program
process.exit(0);
}
const stageAll = await confirm({
const stageAll = amend
? null
: await confirm({
message: "Stage all changes?",
initialValue: true,
});
@@ -204,14 +208,24 @@ program
if (stageAll) {
await simpleGit()
.add(".")
.commit(commitMessage, sign ? ["-S"] : []);
.commit(
commitMessage,
sign ? (amend ? ["-S", "--amend"] : ["-S"]) : amend ? ["--amend"] : []
);
} else {
await simpleGit().commit(commitMessage, sign ? ["-S"] : []);
await simpleGit().commit(
commitMessage,
sign ? (amend ? ["-S", "--amend"] : ["-S"]) : amend ? ["--amend"] : []
);
}
note(commitMessage);
outro("Finished creating a conventional commit, feel free to push");
outro(
`Finished ${
amend ? "amending" : "creating"
} a conventional commit, feel free to push`
);
});
program