zx-bulk-release 1.14.0 → 1.14.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [1.14.3](https://github.com/semrel-extra/zx-bulk-release/compare/v1.14.2...v1.14.3) (2022-06-27)
2
+
3
+ ### Fixes & improvements
4
+ * fix: disable gh-pages by default ([78ce3e8](https://github.com/semrel-extra/zx-bulk-release/commit/78ce3e84cf217a4f91e62cf27281d2f1e014168d))
5
+
6
+ ## [1.14.2](https://github.com/semrel-extra/zx-bulk-release/compare/v1.14.1...v1.14.2) (2022-06-27)
7
+
8
+ ### Fixes & improvements
9
+ * refactor: memoize origins ([4df0550](https://github.com/semrel-extra/zx-bulk-release/commit/4df05504f8a3ba770614374aff792bbc540cb640))
10
+
11
+ ## [1.14.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.14.0...v1.14.1) (2022-06-27)
12
+
13
+ ### Fixes & improvements
14
+ * fix: impr gh-pages path resolve ([09a5ae9](https://github.com/semrel-extra/zx-bulk-release/commit/09a5ae96fc17b6d819a5622bef15045476a4b4ed))
15
+
1
16
  ## [1.14.0](https://github.com/semrel-extra/zx-bulk-release/compare/v1.13.0...v1.14.0) (2022-06-27)
2
17
 
3
18
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zx-bulk-release",
3
- "version": "1.14.0",
3
+ "version": "1.14.3",
4
4
  "description": "zx-based alternative for multi-semantic-release",
5
5
  "type": "module",
6
6
  "exports": "./src/main/js/index.js",
@@ -17,7 +17,7 @@ export const defaultConfig = {
17
17
  cmd: 'yarn && yarn build && yarn test',
18
18
  npmFetch: true,
19
19
  changelog: 'changelog',
20
- ghPages: 'gh-pages'
20
+ // ghPages: 'gh-pages'
21
21
  }
22
22
 
23
23
  export const getConfig = async (...cwds) =>
@@ -129,7 +129,7 @@ const ghPages = async (pkg) => {
129
129
  console.log(`[${pkg.name}] publish docs to ${branch}`)
130
130
 
131
131
  await push({
132
- cwd: path.resolve(pkg.absPath, from),
132
+ cwd: path.join(pkg.absPath, from),
133
133
  from: '.',
134
134
  to,
135
135
  branch,
@@ -225,7 +225,7 @@ export const parseEnv = (env = process.env) => {
225
225
 
226
226
  export const parseRepo = async (cwd) => {
227
227
  const {ghToken, ghUser} = parseEnv($.env)
228
- const originUrl = (await $.o({cwd})`git config --get remote.origin.url`).toString().trim()
228
+ const originUrl = await getOrigin(cwd)
229
229
  const [,,repoHost, repoName] = originUrl.replace(':', '/').replace(/\.git/, '').match(/.+(@|\/\/)([^/]+)\/(.+)$/) || []
230
230
  const repoPublicUrl = `https://${repoHost}/${repoName}`
231
231
  const repoAuthedUrl = ghToken && ghUser && repoHost && repoName?
@@ -240,3 +240,12 @@ export const parseRepo = async (cwd) => {
240
240
  originUrl,
241
241
  }
242
242
  }
243
+
244
+ const origins = {}
245
+ export const getOrigin = async (cwd) => {
246
+ if (!origins[cwd]) {
247
+ origins[cwd] = (await $.o({cwd})`git config --get remote.origin.url`).toString().trim()
248
+ }
249
+
250
+ return origins[cwd]
251
+ }