@cocreate/cli 1.39.1 → 1.39.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 +14 -0
- package/package.json +1 -1
- package/src/commands/fs/automated.js +15 -11
- package/src/commands/upload.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.39.3](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.39.2...v1.39.3) (2023-08-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* removed build as no webpack.config exist ([bd09c96](https://github.com/CoCreate-app/CoCreate-cli/commit/bd09c965986b952f69abe20fa628dd19f6738a30))
|
|
7
|
+
|
|
8
|
+
## [1.39.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.39.1...v1.39.2) (2023-08-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* missing configPath ([d50fb8f](https://github.com/CoCreate-app/CoCreate-cli/commit/d50fb8f1f1ea6bc5f2999cdf227a0d3aa1a1508f))
|
|
14
|
+
|
|
1
15
|
## [1.39.1](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.39.0...v1.39.1) (2023-08-21)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.3",
|
|
4
4
|
"description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
let glob = require("glob");
|
|
2
2
|
let fs = require('fs');
|
|
3
|
-
const path = require("path")
|
|
4
3
|
|
|
5
4
|
function globUpdater(er, files) {
|
|
6
5
|
|
|
@@ -8,12 +7,19 @@ function globUpdater(er, files) {
|
|
|
8
7
|
console.log(files, 'glob resolving issue')
|
|
9
8
|
else
|
|
10
9
|
files.forEach(filename => {
|
|
11
|
-
update(filename + '
|
|
10
|
+
update(filename + 'automated.yml')
|
|
12
11
|
})
|
|
13
12
|
console.log('Completed')
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
function update(YmlPath) {
|
|
16
|
+
let build = `- name: Build
|
|
17
|
+
run: yarn build`
|
|
18
|
+
|
|
19
|
+
let webpackPath = YmlPath.replace('.github/workflows/automated.yml', 'webpack.config.js')
|
|
20
|
+
if (!fs.existsSync(webpackPath))
|
|
21
|
+
build = ''
|
|
22
|
+
|
|
17
23
|
let fileContent = `name: Automated Workflow
|
|
18
24
|
on:
|
|
19
25
|
push:
|
|
@@ -74,8 +80,7 @@ jobs:
|
|
|
74
80
|
run: echo "//registry.npmjs.org/:_authToken=\${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
75
81
|
- name: Install dependencies
|
|
76
82
|
run: yarn install
|
|
77
|
-
|
|
78
|
-
run: yarn build
|
|
83
|
+
${build}
|
|
79
84
|
- name: Set Environment Variables
|
|
80
85
|
run: |
|
|
81
86
|
echo "organization_id=\${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
|
|
@@ -85,7 +90,6 @@ jobs:
|
|
|
85
90
|
run: coc upload
|
|
86
91
|
|
|
87
92
|
`;
|
|
88
|
-
// process.exit()
|
|
89
93
|
if (fs.existsSync(YmlPath))
|
|
90
94
|
fs.unlinkSync(YmlPath)
|
|
91
95
|
fs.writeFileSync(YmlPath, fileContent)
|
|
@@ -96,10 +100,10 @@ jobs:
|
|
|
96
100
|
|
|
97
101
|
// glob("/home/cocreate/CoCreate/CoCreate-components/CoCreate-actions/.github/workflows", globUpdater)
|
|
98
102
|
glob("/home/cocreate/CoCreate/CoCreate-components/*/.github/workflows/", globUpdater)
|
|
99
|
-
glob("/home/cocreate/CoCreate/CoCreate-apps/*/.github/workflows/", globUpdater)
|
|
100
|
-
glob("/home/cocreate/CoCreate/CoCreate-plugins/*/.github/workflows/", globUpdater)
|
|
103
|
+
// glob("/home/cocreate/CoCreate/CoCreate-apps/*/.github/workflows/", globUpdater)
|
|
104
|
+
// glob("/home/cocreate/CoCreate/CoCreate-plugins/*/.github/workflows/", globUpdater)
|
|
101
105
|
|
|
102
|
-
glob("/home/cocreate/CoCreate/CoCreate-admin/.github/workflows/", globUpdater)
|
|
103
|
-
glob("/home/cocreate/CoCreate/CoCreateCSS/.github/workflows/", globUpdater)
|
|
104
|
-
glob("/home/cocreate/CoCreate/CoCreateJS/.github/workflows/", globUpdater)
|
|
105
|
-
glob("/home/cocreate/CoCreate/CoCreate-wesite/.github/workflows/", globUpdater)
|
|
106
|
+
// glob("/home/cocreate/CoCreate/CoCreate-admin/.github/workflows/", globUpdater)
|
|
107
|
+
// glob("/home/cocreate/CoCreate/CoCreateCSS/.github/workflows/", globUpdater)
|
|
108
|
+
// glob("/home/cocreate/CoCreate/CoCreateJS/.github/workflows/", globUpdater)
|
|
109
|
+
// glob("/home/cocreate/CoCreate/CoCreate-wesite/.github/workflows/", globUpdater)
|
package/src/commands/upload.js
CHANGED
|
@@ -5,15 +5,15 @@ const fs = require('fs');
|
|
|
5
5
|
module.exports = async function upload(repos, args) {
|
|
6
6
|
let CoCreateConfig
|
|
7
7
|
if (!args.length) {
|
|
8
|
-
let
|
|
9
|
-
if (!CoCreateConfig && fs.existsSync(
|
|
10
|
-
CoCreateConfig = require(
|
|
8
|
+
let configPath = path.resolve(process.cwd(), 'CoCreate.config.js');
|
|
9
|
+
if (!CoCreateConfig && fs.existsSync(configPath)) {
|
|
10
|
+
CoCreateConfig = require(configPath);
|
|
11
11
|
} else {
|
|
12
12
|
console.log('CoCreate.config.js could not be found.')
|
|
13
13
|
process.exit()
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
await file(CoCreateConfig)
|
|
16
|
+
await file(CoCreateConfig, configPath)
|
|
17
17
|
|
|
18
18
|
} else {
|
|
19
19
|
for (let arg of args) {
|