enablement-build-template-generate 1.0.5 → 1.0.7
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 +15 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -41,14 +41,18 @@ async function main(options) {
|
|
|
41
41
|
const cwd = path.join(templatePath, jobConfig.rootPath);
|
|
42
42
|
|
|
43
43
|
let jobRoot = jobConfig.rootPath.replace(/^[\.\/\\]+/, '');
|
|
44
|
+
let search = options.exclude;
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
if(search.length) {
|
|
47
|
+
for(let i=0;i<search.length;i++) {
|
|
48
|
+
search[i]='!**/'+search[i];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
search.unshift(`./**/package.json`);
|
|
53
|
+
search.push(`!**/node_modules`);
|
|
54
|
+
|
|
55
|
+
globby(search,{ cwd: cwd }).then((images)=>{
|
|
52
56
|
images.sort();
|
|
53
57
|
let jobs = [];
|
|
54
58
|
let exclude = jobConfig.exclude||[];
|
|
@@ -118,6 +122,7 @@ async function main(options) {
|
|
|
118
122
|
|
|
119
123
|
let options = {
|
|
120
124
|
config: "./.cicd/templates/templated.json",
|
|
125
|
+
exclude: [],
|
|
121
126
|
debug: false,
|
|
122
127
|
push: true
|
|
123
128
|
}
|
|
@@ -128,6 +133,9 @@ for (let i = 2; i < argv.length; i++) {
|
|
|
128
133
|
if (argv[i] === "--debug") { options.debug = true; continue; }
|
|
129
134
|
if (argv[i].substring(0, 2) === "--") {
|
|
130
135
|
let name = argv[i].substring(2);
|
|
136
|
+
if (name==="exclude") {
|
|
137
|
+
options[name] = argv[i + 1].split(',');
|
|
138
|
+
i++;
|
|
131
139
|
if (options[name] !== undefined) {
|
|
132
140
|
options[name] = argv[i + 1];
|
|
133
141
|
i++;
|