enablement-build-template-generate 1.0.5 → 1.0.6

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.
Files changed (2) hide show
  1. package/index.js +9 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -41,14 +41,12 @@ 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
- globby(
46
- [
47
- `./**/package.json`,
48
- `!**/node_modules`
49
- ],
50
- { cwd: cwd },
51
- ).then((images)=>{
46
+ search.unshift(`./**/package.json`);
47
+ search.push(`!**/node_modules`);
48
+
49
+ globby(search,{ cwd: cwd }).then((images)=>{
52
50
  images.sort();
53
51
  let jobs = [];
54
52
  let exclude = jobConfig.exclude||[];
@@ -118,6 +116,7 @@ async function main(options) {
118
116
 
119
117
  let options = {
120
118
  config: "./.cicd/templates/templated.json",
119
+ exclude: [],
121
120
  debug: false,
122
121
  push: true
123
122
  }
@@ -128,6 +127,9 @@ for (let i = 2; i < argv.length; i++) {
128
127
  if (argv[i] === "--debug") { options.debug = true; continue; }
129
128
  if (argv[i].substring(0, 2) === "--") {
130
129
  let name = argv[i].substring(2);
130
+ if (name==="exclude") {
131
+ options[name] = argv[i + 1].split(',');
132
+ i++;
131
133
  if (options[name] !== undefined) {
132
134
  options[name] = argv[i + 1];
133
135
  i++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enablement-build-template-generate",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Generates build yaml for mono repos",
5
5
  "type": "module",
6
6
  "module": "./index.js",