Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit 0860d90

Browse files
authored
fix: git commands, correctly escape (#20)
Co-authored-by: Jan Soukup <[email protected]>
1 parent 6ccec9b commit 0860d90

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

Diff for: lib/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ program
142142
// So we are overwriting last commit message and pushing to release branch.
143143
await git
144144
//
145-
.raw(`--message Release: ${nextTagWithPrefix}`, '--amend')
145+
.raw(`--message "Release: ${nextTagWithPrefix}"`, '--amend')
146146
.push(remote.name, `${branch.current}:${releaseBranch}`)
147147

148148
// Create tag and push it to master.

Diff for: lib/utils.ts

+9-21
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,15 @@ export const bumpMapping = [
6565
bump: BumpType.Patch,
6666
},
6767
{
68-
test: /(.*)(feat:|feat\((.*)\):)/,
69-
bump: BumpType.Minor,
70-
},
71-
{
72-
test: /(.*)(feature:|feature\((.*)\):)/,
68+
test: /(.*)(feat:|feat\((.*)\):|feature:|feature\((.*)\):)/,
7369
bump: BumpType.Minor,
7470
},
7571
{
7672
test: /(.*)(perf:|perf\((.*)\):)/,
7773
bump: BumpType.Minor,
7874
},
7975
{
80-
test: /(.*)(ref:|ref\((.*)\):)/,
81-
bump: BumpType.Minor,
82-
},
83-
{
84-
test: /(.*)(refactor:|refactor\((.*)\):)/,
76+
test: /(.*)(ref:|ref\((.*)\):|refactor:|refactor\((.*)\):|refactoring:|refactoring\((.*)\):)/,
8577
bump: BumpType.Minor,
8678
},
8779
{
@@ -93,7 +85,7 @@ export const bumpMapping = [
9385
bump: BumpType.Minor,
9486
},
9587
{
96-
test: /(.*)(test:|test\((.*)\):)/,
88+
test: /(.*)(test:|test\((.*)\):|tests:|tests\((.*)\):)/,
9789
bump: BumpType.Minor,
9890
},
9991
{
@@ -105,11 +97,7 @@ export const bumpMapping = [
10597
bump: BumpType.Minor,
10698
},
10799
{
108-
test: /(.*)(docs:|docs\((.*)\):)/,
109-
bump: BumpType.Minor,
110-
},
111-
{
112-
test: /(.*)(doc:|doc\((.*)\):)/,
100+
test: /(.*)(docs:|docs\((.*)\):|doc:|doc\((.*)\):)/,
113101
bump: BumpType.Minor,
114102
},
115103
{
@@ -149,16 +137,16 @@ export const replaceVersionInCommonFiles = (oldVersion: string, newVersion: stri
149137
const results = replaceInFileSync({
150138
allowEmptyPaths: true,
151139
ignore: [
152-
'**/node_modules',
153-
'**/.venv',
154-
'**/vendor',
155-
'**/.git',
140+
'**/node_modules/**',
141+
'**/.venv/**',
142+
'**/vendor/**',
143+
'**/.git/**',
156144
//
157145
],
158146
files: [
159147
'package.json',
160148
'package-lock.json',
161-
'package-lock.json', // duplicate because lock file contains two occurences.
149+
'package-lock.json', // Duplicate because lock file contains two occurences.
162150
// 'yarn.lock', Yarn3 lock file does not contain version from package.json
163151
'composer.json',
164152
// 'composer.lock', Composer2 lock file does not include version from composer.json

0 commit comments

Comments
 (0)