Skip to content

Commit

Permalink
Merge pull request #404 from ItinerisLtd/github/issues/262
Browse files Browse the repository at this point in the history
fix(git): exit early if already tag exists
  • Loading branch information
codepuncher authored Jan 5, 2024
2 parents cc73583 + 3acd301 commit 4cd91d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class ItinerisltdComposify extends Command {
this.success()

this.heading('Check version not yet tagged on git remote')
const {code: versionCheckResultCode} = await this.logAndRunCommand('git', ['show-ref', '--tags', '--quiet', '--verify', '--', `refs/tags/${version}`], {cwd: gitReadOnlyDir}).catch(error => error)
const {exitCode: versionCheckResultCode} = await this.logAndRunCommand('git', ['show-ref', '--tags', '--quiet', '--verify', '--', `refs/tags/${version}`], {cwd: gitReadOnlyDir}).catch(error => error)

if (versionCheckResultCode === 0) {
this.success(`Version ${version} already tagged on git remote`)
Expand Down

0 comments on commit 4cd91d7

Please sign in to comment.