Skip to content

Commit ccdefb7

Browse files
authored
remove tag for git (#24)
* feat: no git tag version Fixes: #21 * fix: 🐛 --no-git-tag-version does not commit see npm/cli#3710 * 0.7.4
1 parent 392e4e5 commit ccdefb7

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

bin/pre-push.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ shell.rm('-f', 'package-lock.json')
6969
shell.exec('npm version patch --no-package-lock').code === 0 || process.exit(1)
7070
process.env[INNER_PRE_HOOK] = '1'
7171

72+
const version = shell.exec('git log --pretty=format:"%s" HEAD^0 -1', { silent : true }).stdout
73+
shell.exec(`git tag -d v${version}`).code === 0 || process.exit(1)
74+
7275
const refMaps = refs.map(ref => ref.remoteBranch ? ref.localBranch + ':' + ref.remoteBranch : '')
7376
const cmd = ['git push', remoteName, ...refMaps].join(' ')
7477
shell.exec(cmd).code === 0 || process.exit(1)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chatie/git-scripts",
3-
"version": "0.7.3",
3+
"version": "0.7.4",
44
"description": "Git Hooks Integration for Chatie Projects",
55
"directories": {
66
"doc": "docs",

0 commit comments

Comments
 (0)