sdc-build-wp 4.3.3 → 4.3.4
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/index.js +12 -3
- package/package.json +1 -1
- package/.github/workflows/tagged-release-and-publish.yml +0 -47
- package/.nvmrc +0 -1
package/index.js
CHANGED
|
@@ -44,20 +44,20 @@ project.builds = argv.builds ? argv.builds.split(',') : Object.keys(project.comp
|
|
|
44
44
|
(async() => {
|
|
45
45
|
|
|
46
46
|
let initialBuildTimerStart = Date.now();
|
|
47
|
-
log('info', `Starting initial build`);
|
|
47
|
+
log('info', `Starting initial build [${project.builds.join(', ')}]`);
|
|
48
48
|
for (let build of project.builds) {
|
|
49
49
|
await project.components[build].init();
|
|
50
50
|
}
|
|
51
51
|
log('info', `Finished initial build in ${Math.round((Date.now() - initialBuildTimerStart) / 1000)} seconds`);
|
|
52
52
|
|
|
53
53
|
if (argv.watch) {
|
|
54
|
+
log('info', `Started watching [${project.builds.join(', ')}]`);
|
|
54
55
|
for (let build of project.builds) {
|
|
55
56
|
await project.components[build].watch();
|
|
56
57
|
}
|
|
57
58
|
try {
|
|
58
59
|
await fs.access(project.paths.errorLog);
|
|
59
|
-
|
|
60
|
-
errorLogTail.on('line', function(data) {
|
|
60
|
+
new Tail(project.paths.errorLog).on('line', function(data) {
|
|
61
61
|
log('php', data);
|
|
62
62
|
});
|
|
63
63
|
} catch (error) {
|
|
@@ -66,3 +66,12 @@ project.builds = argv.builds ? argv.builds.split(',') : Object.keys(project.comp
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
})();
|
|
69
|
+
|
|
70
|
+
process.on('SIGINT', function() {
|
|
71
|
+
console.log(`\r`);
|
|
72
|
+
if (project.components.server?.server) {
|
|
73
|
+
project.components.server.server.exit();
|
|
74
|
+
}
|
|
75
|
+
log('info', `Exiting sdc-build-wp`);
|
|
76
|
+
process.exit(0);
|
|
77
|
+
});
|
package/package.json
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "tagged-release-and-publish"
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
tags:
|
|
7
|
-
- "v*"
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
tagged-release:
|
|
11
|
-
name: "Tagged Release"
|
|
12
|
-
runs-on: "ubuntu-latest"
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
# ...
|
|
16
|
-
- name: "Build & test"
|
|
17
|
-
run: |
|
|
18
|
-
echo "done!"
|
|
19
|
-
|
|
20
|
-
- uses: "marvinpinto/action-automatic-releases@latest"
|
|
21
|
-
with:
|
|
22
|
-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
23
|
-
prerelease: false
|
|
24
|
-
build:
|
|
25
|
-
needs: tagged-release
|
|
26
|
-
runs-on: ubuntu-latest
|
|
27
|
-
steps:
|
|
28
|
-
- uses: actions/checkout@v2
|
|
29
|
-
- uses: actions/setup-node@v2
|
|
30
|
-
with:
|
|
31
|
-
node-version: 16
|
|
32
|
-
- run: npm ci
|
|
33
|
-
- run: npm test
|
|
34
|
-
|
|
35
|
-
publish-npm:
|
|
36
|
-
needs: build
|
|
37
|
-
runs-on: ubuntu-latest
|
|
38
|
-
steps:
|
|
39
|
-
- uses: actions/checkout@v2
|
|
40
|
-
- uses: actions/setup-node@v2
|
|
41
|
-
with:
|
|
42
|
-
node-version: 16
|
|
43
|
-
registry-url: https://registry.npmjs.org/
|
|
44
|
-
- run: npm ci
|
|
45
|
-
- run: npm publish
|
|
46
|
-
env:
|
|
47
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22
|