Skip to content

Commit

Permalink
fix(module): remove prepare step, use semantic release exec
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Nov 15, 2020
1 parent d8b8c31 commit 54f6e28
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@qiwi/semantic-release-gh-pages-plugin": "^5.0.2",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.1.1",
"@semantic-release/npm": "^7.0.6",
Expand Down Expand Up @@ -46,9 +47,7 @@
"test": "mocha",
"coverage": "nyc mocha",
"check": "./check.sh",
"docs": "./build.sh",
"postinstall": "./check.sh",
"prepare": "./build.sh"
"postinstall": "./check.sh"
},
"preferGlobal": false,
"main": "./dist/lib/index.js",
Expand Down
7 changes: 5 additions & 2 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,23 @@ const plugins = [
'commitsSort': ['subject', 'scope']
}
}],
['@semantic-release/exec', {
'prepareCmd': 'BRANCH=${options.branch} ./build.sh'
}],
['@semantic-release/changelog', {
'changelogFile': 'CHANGELOG.md'
}],
'@semantic-release/npm',
'@semantic-release/github'
];

if(process.env.BRANCH === 'main') {
if (process.env.BRANCH === 'main') {
plugins.push(['@semantic-release/git', {
'assets': ['CHANGELOG.md', 'package.json', 'package-lock.json'],
'message': 'chore(release): :bookmark: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}]);
}
if(process.env.BRANCH === 'main' || process.env.BRANCH === 'develop') {
if (process.env.BRANCH === 'main' || process.env.BRANCH === 'develop') {
plugins.push(['@qiwi/semantic-release-gh-pages-plugin', {
'msg': 'docs: Updated for <%= nextRelease.gitTag %>',
'src': './doc',
Expand Down

0 comments on commit 54f6e28

Please sign in to comment.