@qse/edu-scripts 1.12.2 → 1.12.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 +4 -0
- package/lib/build.js +0 -4
- package/lib/commit-dist.js +8 -12
- package/lib/config/webpackConfig.js +0 -1
- package/package.json +1 -1
- package/src/build.js +0 -4
- package/src/commit-dist.js +4 -5
- package/src/config/webpackConfig.js +0 -1
package/CHANGELOG.md
CHANGED
package/lib/build.js
CHANGED
package/lib/commit-dist.js
CHANGED
|
@@ -14,8 +14,6 @@ const exec = (cmd, opts) => require('child_process').execSync(cmd, {
|
|
|
14
14
|
|
|
15
15
|
const tmp = require('tmp');
|
|
16
16
|
|
|
17
|
-
const glob = require('globby');
|
|
18
|
-
|
|
19
17
|
function validateSVNRoot(root) {
|
|
20
18
|
const ls = exec(`svn ls ${root}`);
|
|
21
19
|
return ['trunk', 'branches'].every(s => ls.includes(s));
|
|
@@ -67,17 +65,15 @@ function copyDistToRepo(info) {
|
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
exec(`svn co ${info.distBranchDirURL} ${tmpdir}`);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})
|
|
68
|
+
|
|
69
|
+
try {
|
|
70
|
+
exec(`svn rm * --force -q`, {
|
|
71
|
+
cwd: tmpdir
|
|
72
|
+
});
|
|
73
|
+
} catch (error) {}
|
|
74
|
+
|
|
76
75
|
fs.copySync(paths.dist, tmpdir);
|
|
77
|
-
|
|
78
|
-
cwd: tmpdir
|
|
79
|
-
});
|
|
80
|
-
exec(`svn add "${files.join('" "')}"`, {
|
|
76
|
+
exec(`svn add * --force --auto-props --parents --depth infinity -q`, {
|
|
81
77
|
cwd: tmpdir
|
|
82
78
|
});
|
|
83
79
|
const msg = `[edu-scripts] commit ${info.branch} dist #${info.revision} @${info.author}`;
|
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -44,10 +44,6 @@ module.exports = async function build(args) {
|
|
|
44
44
|
if (stats.compilation.errors.length) {
|
|
45
45
|
console.log(chalk.red('编译失败'))
|
|
46
46
|
console.log(stats.toString({ all: false, errors: true, colors: true }))
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Fail the build if running in a CI server
|
|
50
|
-
if (error || stats.compilation.errors.length) {
|
|
51
47
|
process.exit(1)
|
|
52
48
|
}
|
|
53
49
|
|
package/src/commit-dist.js
CHANGED
|
@@ -4,7 +4,6 @@ const fs = require('fs-extra')
|
|
|
4
4
|
const exec = (cmd, opts) =>
|
|
5
5
|
require('child_process').execSync(cmd, { encoding: 'utf-8', stdio: 'pipe', ...opts })
|
|
6
6
|
const tmp = require('tmp')
|
|
7
|
-
const glob = require('globby')
|
|
8
7
|
|
|
9
8
|
function validateSVNRoot(root) {
|
|
10
9
|
const ls = exec(`svn ls ${root}`)
|
|
@@ -49,13 +48,13 @@ function copyDistToRepo(info) {
|
|
|
49
48
|
}
|
|
50
49
|
exec(`svn co ${info.distBranchDirURL} ${tmpdir}`)
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
try {
|
|
52
|
+
exec(`svn rm * --force -q`, { cwd: tmpdir })
|
|
53
|
+
} catch (error) {}
|
|
54
54
|
|
|
55
55
|
fs.copySync(paths.dist, tmpdir)
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
exec(`svn add "${files.join('" "')}"`, { cwd: tmpdir })
|
|
57
|
+
exec(`svn add * --force --auto-props --parents --depth infinity -q`, { cwd: tmpdir })
|
|
59
58
|
|
|
60
59
|
const msg = `[edu-scripts] commit ${info.branch} dist #${info.revision} @${info.author}`
|
|
61
60
|
exec(`svn ci -m "${msg}"`, { cwd: tmpdir })
|