Skip to content

Commit

Permalink
remove tag for git (#24)
Browse files Browse the repository at this point in the history
* feat: no git tag version
Fixes:  #21

* fix: 🐛 --no-git-tag-version does not commit

see npm/cli#3710

* 0.7.4
  • Loading branch information
binsee authored Apr 9, 2022
1 parent 392e4e5 commit ccdefb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bin/pre-push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ shell.rm('-f', 'package-lock.json')
shell.exec('npm version patch --no-package-lock').code === 0 || process.exit(1)
process.env[INNER_PRE_HOOK] = '1'

const version = shell.exec('git log --pretty=format:"%s" HEAD^0 -1', { silent : true }).stdout
shell.exec(`git tag -d v${version}`).code === 0 || process.exit(1)

const refMaps = refs.map(ref => ref.remoteBranch ? ref.localBranch + ':' + ref.remoteBranch : '')
const cmd = ['git push', remoteName, ...refMaps].join(' ')
shell.exec(cmd).code === 0 || process.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chatie/git-scripts",
"version": "0.7.3",
"version": "0.7.4",
"description": "Git Hooks Integration for Chatie Projects",
"directories": {
"doc": "docs",
Expand Down

0 comments on commit ccdefb7

Please sign in to comment.