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 +15 -0
- package/package.json +1 -1
- package/src/main/js/config.js +1 -1
- package/src/main/js/publish.js +11 -2
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
package/src/main/js/config.js
CHANGED
package/src/main/js/publish.js
CHANGED
|
@@ -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.
|
|
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 =
|
|
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
|
+
}
|