Skip to content

Commit 6498c07

Browse files
authored
Change to use buildCommand option of shipjs. (#102)
It seems that the build runs by default when the buildCommand option is removed. https://community.algolia.com/shipjs/reference/all-config.html#buildcommand
1 parent 716cdf8 commit 6498c07

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
"lint": "eslint --ext js,ts lib scripts tests docs/.vuepress --ignore-pattern \"!.*\"",
101101
"lint:docs": "eslint --ext js,vue,md docs --ignore-pattern \"!.*\"",
102102
"release:prepare": "shipjs prepare",
103-
"prerelease:trigger": "yarn build",
104103
"release:trigger": "shipjs trigger",
105104
"test": "mocha --require ts-node/register \"./tests/**/*.ts\"",
106105
"test:debug": "mocha --require ts-node/register --inspect \"./tests/**/*.ts\"",

ship.config.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require('path')
55
const read = promisify(fs.readFile)
66
const write = fs.writeFileSync
77

8-
function extractSpecificChangelog (changelog, version) {
8+
function extractSpecificChangelog(changelog, version) {
99
if (!changelog) {
1010
return null
1111
}
@@ -18,8 +18,12 @@ function extractSpecificChangelog (changelog, version) {
1818
return matches ? matches[1] : null
1919
}
2020

21-
async function commitChangelog (current, next) {
22-
const { stdout } = await execa('npx', ['lerna-changelog', '--next-version', `v${next}`])
21+
async function commitChangelog(current, next) {
22+
const { stdout } = await execa('npx', [
23+
'lerna-changelog',
24+
'--next-version',
25+
`v${next}`
26+
])
2327
const escapedVersion = next.replace(/\./g, '\\.')
2428
const regex = new RegExp(
2529
`(#+?\\s\\[?v?${escapedVersion}\\]?[\\s\\S]*?)(#+?\\s\\[?v?\\d\\.\\d\\.\\d\\]?)`,
@@ -35,23 +39,16 @@ module.exports = {
3539
mergeStrategy: { toSameBranch: ['master'] },
3640
monorepo: undefined,
3741
updateChangelog: false,
38-
buildCommand: ({ isYarn }) => undefined,
3942
beforeCommitChanges: ({ nextVersion, exec, dir }) => {
4043
return new Promise(resolve => {
4144
const pkg = require('./package.json')
4245
commitChangelog(pkg.version, nextVersion).then(resolve)
4346
})
4447
},
45-
formatCommitMessage: ({
46-
version,
47-
releaseType,
48-
mergeStrategy,
49-
baseBranch
50-
}) => `${releaseType} release v${version}`,
51-
formatPullRequestTitle: ({
52-
version,
53-
releaseType
54-
}) => `${releaseType} release v${version}`,
48+
formatCommitMessage: ({ version, releaseType, mergeStrategy, baseBranch }) =>
49+
`${releaseType} release v${version}`,
50+
formatPullRequestTitle: ({ version, releaseType }) =>
51+
`${releaseType} release v${version}`,
5552
shouldRelease: () => true,
5653
releases: {
5754
extractChangelog: ({ version, dir }) => {

0 commit comments

Comments
 (0)