zx-bulk-release 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +7 -7
- package/CHANGELOG.md +18 -0
- package/README.md +5 -2
- package/package.json +1 -1
- package/src/main/js/build.js +4 -6
- package/src/main/js/config.js +1 -2
- package/src/main/js/index.js +2 -2
- package/src/main/js/publish.js +6 -4
- package/src/test/js/integration.test.js +2 -4
package/.github/workflows/ci.yml
CHANGED
|
@@ -107,13 +107,13 @@ jobs:
|
|
|
107
107
|
- name: Docs
|
|
108
108
|
run: yarn docs
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
- name: Codeclimate
|
|
111
|
+
uses: paambaati/codeclimate-action@v3.0.0
|
|
112
|
+
env:
|
|
113
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
114
|
+
with:
|
|
115
|
+
coverageLocations: |
|
|
116
|
+
${{github.workspace}}/coverage/*.lcov:lcov
|
|
117
117
|
|
|
118
118
|
- name: Release
|
|
119
119
|
env:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [1.10.0](https://github.com/semrel-extra/zx-bulk-release/compare/v1.9.2...v1.10.0) (2022-06-26)
|
|
2
|
+
|
|
3
|
+
### Fixes & improvements
|
|
4
|
+
* docs: add CC badges ([475c57a](https://github.com/semrel-extra/zx-bulk-release/commit/475c57aaa6efc1bf8bb6e44b3abbfb6da2f425dd))
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
* feat: configure ghPages push via opts ([ccc124e](https://github.com/semrel-extra/zx-bulk-release/commit/ccc124ef87fe4e049386d45c1676929dc0d36edd))
|
|
8
|
+
|
|
9
|
+
## [1.9.2](https://github.com/semrel-extra/zx-bulk-release/compare/v1.9.1...v1.9.2) (2022-06-26)
|
|
10
|
+
|
|
11
|
+
### Fixes & improvements
|
|
12
|
+
* refactor: simplify build flow ([900380d](https://github.com/semrel-extra/zx-bulk-release/commit/900380da36be115290da6117090da47bdd3fc8f7))
|
|
13
|
+
|
|
14
|
+
## [1.9.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.9.0...v1.9.1) (2022-06-26)
|
|
15
|
+
|
|
16
|
+
### Fixes & improvements
|
|
17
|
+
* refactor: replace postbuild hook with postupdate ([b7d68a5](https://github.com/semrel-extra/zx-bulk-release/commit/b7d68a5a2b9dec6516204f3fcbbc3c08db9c6d90))
|
|
18
|
+
|
|
1
19
|
## [1.9.0](https://github.com/semrel-extra/zx-bulk-release/compare/v1.8.0...v1.9.0) (2022-06-26)
|
|
2
20
|
|
|
3
21
|
### Features
|
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# zx-bulk-release
|
|
2
2
|
> [zx](https://github.com/google/zx)-based alternative for [multi-semantic-release](https://github.com/dhoulb/multi-semantic-release)
|
|
3
3
|
|
|
4
|
+
[](https://github.com/semrel-extra/zx-bulk-release/actions)
|
|
5
|
+
[](https://codeclimate.com/github/semrel-extra/zx-bulk-release/maintainability)
|
|
6
|
+
[](https://codeclimate.com/github/semrel-extra/zx-bulk-release/test_coverage)
|
|
7
|
+
|
|
4
8
|
🚧 Work in progress. Early access preview
|
|
5
9
|
|
|
6
10
|
## Roadmap
|
|
@@ -39,8 +43,7 @@ await run({
|
|
|
39
43
|
### Config
|
|
40
44
|
Any [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) compliant format: `.releaserc`, `.release.json`, `.release.yaml`, etc.
|
|
41
45
|
```yaml
|
|
42
|
-
buildCmd: 'yarn build'
|
|
43
|
-
postbuildCmd: 'yarn install'
|
|
46
|
+
buildCmd: 'yarn && yarn build'
|
|
44
47
|
testCmd: 'yarn test'
|
|
45
48
|
fetch: true
|
|
46
49
|
```
|
package/package.json
CHANGED
package/src/main/js/build.js
CHANGED
|
@@ -18,13 +18,11 @@ export const build = (pkg, packages) => ctx(async ($) => {
|
|
|
18
18
|
if (!pkg.fetched) {
|
|
19
19
|
await $.raw`${config.buildCmd}`
|
|
20
20
|
console.log(`built '${pkg.name}'`)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (config.postbuildCmd) await $.raw`${config.postbuildCmd}`
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (config.testCmd) {
|
|
23
|
+
await $.raw`${config.testCmd}`
|
|
24
|
+
console.log(`tested '${pkg.name}'`)
|
|
25
|
+
}
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
|
package/src/main/js/config.js
CHANGED
package/src/main/js/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {fs,
|
|
1
|
+
import {fs, $} from 'zx-extra'
|
|
2
2
|
import {topo} from '@semrel-extra/topo'
|
|
3
3
|
import {updateDeps} from './deps.js'
|
|
4
4
|
import {getSemanticChanges, resolvePkgVersion} from './analyze.js'
|
|
@@ -26,7 +26,7 @@ export const run = async ({cwd = process.cwd(), env = process.env, flags = {}} =
|
|
|
26
26
|
if (changes.length === 0) continue
|
|
27
27
|
console.log(`semantic changes of '${name}'`, changes)
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
await build(pkg, packages, cwd)
|
|
30
30
|
|
|
31
31
|
if (dryRun) continue
|
|
32
32
|
|
package/src/main/js/publish.js
CHANGED
|
@@ -100,18 +100,20 @@ ${commits.join('\n')}`).join('\n')
|
|
|
100
100
|
})
|
|
101
101
|
|
|
102
102
|
const ghPages = async (pkg) => {
|
|
103
|
-
const {config} = pkg
|
|
104
|
-
if (!
|
|
103
|
+
const {config: {ghPages: opts}} = pkg
|
|
104
|
+
if (!opts) return
|
|
105
105
|
|
|
106
106
|
console.log('publish to gh-pages')
|
|
107
|
-
const [from, branch = 'gh-pages', to = '.'
|
|
107
|
+
const [from, branch = 'gh-pages', to = '.', msg = 'docs updated'] = typeof opts === 'string'
|
|
108
|
+
? opts.split(' ')
|
|
109
|
+
: [opts.from, opts.branch, opts.to, opts.msg]
|
|
108
110
|
|
|
109
111
|
await push({
|
|
110
112
|
cwd: path.resolve(pkg.absPath, from),
|
|
111
113
|
from: '.',
|
|
112
114
|
to,
|
|
113
115
|
branch,
|
|
114
|
-
msg
|
|
116
|
+
msg
|
|
115
117
|
})
|
|
116
118
|
}
|
|
117
119
|
|
|
@@ -49,8 +49,7 @@ const cwd = await createFakeRepo({
|
|
|
49
49
|
test: "node ./index.js"
|
|
50
50
|
},
|
|
51
51
|
release: {
|
|
52
|
-
buildCmd: 'yarn build',
|
|
53
|
-
postbuildCmd: 'yarn install',
|
|
52
|
+
buildCmd: 'yarn && yarn build',
|
|
54
53
|
testCmd: 'yarn test',
|
|
55
54
|
fetch: true
|
|
56
55
|
},
|
|
@@ -112,8 +111,7 @@ const cwd = await createFakeRepo({
|
|
|
112
111
|
test: "node ./index.js"
|
|
113
112
|
},
|
|
114
113
|
release: {
|
|
115
|
-
buildCmd: 'yarn build',
|
|
116
|
-
postbuildCmd: 'yarn install',
|
|
114
|
+
buildCmd: 'yarn && yarn build',
|
|
117
115
|
testCmd: 'yarn test',
|
|
118
116
|
fetch: true,
|
|
119
117
|
ghPages: 'docs gh-pages b'
|