-
Notifications
You must be signed in to change notification settings - Fork 3
fix: reject when command fails. perform commit with --no-verify #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,8 @@ const cli = meow( | |
| const START_OF_LAST_RELEASE_PATTERN = /(^#+ \[?[0-9]+\.[0-9]+\.[0-9]+|<a name=)/m | ||
| const HEADER = `# Changelog\n\nAll notable changes to this project will be documented in this file. See [Convential Commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) for commit guidelines.\n\n` | ||
|
|
||
| const execPromise = (command) => new Promise((r) => exec(command, (e, out) => (e && r(e)) || r(out))) | ||
| const execPromise = (command) => | ||
| new Promise((resolve, reject) => exec(command, (e, out) => (e && reject(e)) || resolve(out))) | ||
|
|
||
| const packageFile = JSON.parse(await readFile('./package.json', { encoding: 'utf-8' })) | ||
| const isMonoRepo = !!packageFile.workspaces | ||
|
|
@@ -182,7 +183,7 @@ if (!cli.flags.dryRun) { | |
| await execPromise(`git add */package.json`) | ||
| } | ||
|
|
||
| await execPromise(`git commit -m "chore(release): v${nextVersion}"`) | ||
| await execPromise(`git commit --no-verify -m "chore(release): v${nextVersion}"`) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not keen on this - I think if there is a pre-commit that fails, something weird is going on and we shouldn't proceed with making a new version until it's fixed.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. eh... this is only commiting a readme and the package.json so the precommit isn't all that relevant imo |
||
|
|
||
| // create tag | ||
| await execPromise(`git tag v${nextVersion}`) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to use:
Like in https://github.com/Sofie-Automation/sofie-package-manager/blob/main/scripts/test-everything.js#L6 and some other places?