Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c69db8f4b9
|
|||
|
46a52ddebb
|
|||
| 37a1d0b25c | |||
| 2ac0307c87 | |||
| 66db269317 | |||
| d3cf78aacb | |||
| 605055eb76 | |||
| e4ba7dab53 | |||
| 85649a71a6 | |||
| d30071e3d7 |
57
CHANGELOG.md
Normal file
57
CHANGELOG.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Changelog
|
||||
|
||||
Generation of this changelog is based on commits
|
||||
|
||||
## v1.1.3
|
||||
|
||||
### Fixes
|
||||
|
||||
- [d3cf78aac] - **commands**: incorrect formatting of changelog hashes
|
||||
|
||||
## v1.1.2
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- [85649a71a] - **commands**: change changelog output text
|
||||
|
||||
## v1.1.1
|
||||
|
||||
### Fixes
|
||||
|
||||
- [7a5880d21] - **commands**: incorrect changelog version generation
|
||||
|
||||
## v1.1.0
|
||||
|
||||
### Features
|
||||
|
||||
- [8e5158726] - **commands**: add release and changelog commands
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- [b05591a31] - **release**: v1.1.0
|
||||
|
||||
## v1.0.0
|
||||
|
||||
### Breaking
|
||||
|
||||
- [7ef777bb2] - use commander for command management
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- [b07d9aaaa] - change question formatting, improve readme
|
||||
|
||||
## v1.0.0-alpha.1
|
||||
|
||||
### Features
|
||||
|
||||
- [b5ca3152c] - add support for body (#1)
|
||||
- [ce0c01347] - initial commit
|
||||
|
||||
### Fixes
|
||||
|
||||
- [2be2887ce] - make commit body wrap properly
|
||||
- [e9d3c5e29] - incorrect config parsing
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- [4e16104d6] - change intro and outro messages
|
||||
@@ -17,6 +17,7 @@ Resultium commit standardization library
|
||||
|
||||
1. Make changes to your git initialized project
|
||||
2. Run `rcz commit` in the root directory
|
||||
- if you wish to sign your commit use `--sign` option
|
||||
3. Answer all the questions
|
||||
4. Push to remote
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@resultium/rcz",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"description": "Resultium commit standardization library, based on conventional commits",
|
||||
"main": "./dist/index.js",
|
||||
"bin": {
|
||||
|
||||
32
src/index.ts
32
src/index.ts
@@ -38,7 +38,10 @@ program
|
||||
program
|
||||
.command("commit")
|
||||
.description("Create a conventional commit")
|
||||
.action(async () => {
|
||||
.option("-S, --sign", "sign the commit")
|
||||
.action(async (options) => {
|
||||
const sign = options.sign ? true : false;
|
||||
|
||||
const config = await GetConfig();
|
||||
|
||||
intro("Creating a conventional commit");
|
||||
@@ -178,9 +181,11 @@ program
|
||||
}${body ? `\n\n${body}` : ``}`;
|
||||
|
||||
if (stageAll) {
|
||||
await simpleGit().add(".").commit(commitMessage);
|
||||
await simpleGit()
|
||||
.add(".")
|
||||
.commit(commitMessage, sign ? ["-S"] : []);
|
||||
} else {
|
||||
await simpleGit().commit(commitMessage);
|
||||
await simpleGit().commit(commitMessage, sign ? ["-S"] : []);
|
||||
}
|
||||
|
||||
note(commitMessage);
|
||||
@@ -208,6 +213,7 @@ program
|
||||
let parsedCommitStacks: Array<CommitStack> = [];
|
||||
|
||||
console.log("# Changelog");
|
||||
console.log("Generation of this changelog is based on commits");
|
||||
|
||||
for (const commit of commits) {
|
||||
const tag = semver.sort(
|
||||
@@ -296,7 +302,7 @@ program
|
||||
: firstMessageLine[0];
|
||||
|
||||
console.log(
|
||||
`${showHashes ? `- [${"`"}${shortHash}${"`"}]` : ``} - ${
|
||||
`${showHashes ? `- [${shortHash}]` : ``} - ${
|
||||
type ? `**${type}**: ${briefMessage}` : briefMessage
|
||||
}`
|
||||
);
|
||||
@@ -316,7 +322,7 @@ program
|
||||
: firstMessageLine[0];
|
||||
|
||||
console.log(
|
||||
`${showHashes ? `- [${"`"}${shortHash}${"`"}]` : ``} - ${
|
||||
`${showHashes ? `- [${shortHash}]` : ``} - ${
|
||||
type ? `**${type}**: ${briefMessage}` : briefMessage
|
||||
}`
|
||||
);
|
||||
@@ -336,7 +342,7 @@ program
|
||||
: firstMessageLine[0];
|
||||
|
||||
console.log(
|
||||
`${showHashes ? `- [${"`"}${shortHash}${"`"}]` : ``} - ${
|
||||
`${showHashes ? `- [${shortHash}]` : ``} - ${
|
||||
type ? `**${type}**: ${briefMessage}` : briefMessage
|
||||
}`
|
||||
);
|
||||
@@ -356,7 +362,7 @@ program
|
||||
: firstMessageLine[0];
|
||||
|
||||
console.log(
|
||||
`${showHashes ? `- [${"`"}${shortHash}${"`"}]` : ``} - ${
|
||||
`${showHashes ? `- [${shortHash}]` : ``} - ${
|
||||
type ? `**${type}**: ${briefMessage}` : briefMessage
|
||||
}`
|
||||
);
|
||||
@@ -371,7 +377,9 @@ program
|
||||
"Changes package.json version and creates a new commit with a tag"
|
||||
)
|
||||
.argument("<version>", "new version formatted in SemVer")
|
||||
.action(async (string: string) => {
|
||||
.option("-S, --sign", "sign the release commit and tag")
|
||||
.action(async (string: string, options) => {
|
||||
const sign = options.sign ? true : false;
|
||||
const version = string.replace("v", "");
|
||||
const packageFile = JSON.parse(
|
||||
(
|
||||
@@ -391,8 +399,12 @@ program
|
||||
|
||||
await simpleGit()
|
||||
.add(".")
|
||||
.commit(`chore(release): v${version}`)
|
||||
.addTag(`v${version}`);
|
||||
.commit(`chore(release): v${version}`, sign ? ["-S"] : [])
|
||||
.tag(
|
||||
sign
|
||||
? [`-s`, `v${version}`, `-m`, `"Version ${version}"`]
|
||||
: [`-a`, `v${version}`, `-m`, `"Version ${version}"`]
|
||||
);
|
||||
});
|
||||
|
||||
program.parse();
|
||||
|
||||
Reference in New Issue
Block a user