@leverege/build-tools 2.96.0 → 2.96.1
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/package.json +7 -3
- package/src/Utils.mjs +1 -1
- package/src/init-my-chart/helm-leaf-chart/charts/leverege-0.12.0.tgz +0 -0
- package/src/service-man/gcloud-k8s/ServiceAccountManager.mjs +1 -2
- package/leverege-build-tools-2.21.13.tgz +0 -0
- package/lib/server/build-tools.js +0 -138
- package/lib/server/firebaseDeploy.js +0 -195
- package/lib/server/firebaseServe.js +0 -116
- package/lib/server/getfbcfg.js +0 -25
- package/lib/server/getjson.js +0 -70
- package/lib/server/overwhelm.js +0 -447
- package/lib/server/push-my-chart.js +0 -18
- package/lib/server/refresh-npm-token.js +0 -135
- package/lib/server/tag-release.js +0 -681
- package/lib/server/unleash.js +0 -50
- package/lib/web/build-tools.js +0 -138
- package/lib/web/firebaseDeploy.js +0 -195
- package/lib/web/firebaseServe.js +0 -116
- package/lib/web/getfbcfg.js +0 -25
- package/lib/web/getjson.js +0 -70
- package/lib/web/overwhelm.js +0 -447
- package/lib/web/push-my-chart.js +0 -18
- package/lib/web/refresh-npm-token.js +0 -135
- package/lib/web/tag-release.js +0 -681
- package/lib/web/unleash.js +0 -50
package/lib/web/unleash.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var _execa = _interopRequireDefault(require("execa"));
|
|
5
|
-
var _simpleGit = _interopRequireDefault(require("simple-git"));
|
|
6
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
7
|
-
const git = new _simpleGit.default();
|
|
8
|
-
const getCurrentBranchName = async () => {
|
|
9
|
-
const branchInfo = await git.branch();
|
|
10
|
-
|
|
11
|
-
// first check to see if there are no branches - new repo?
|
|
12
|
-
if (Object.keys(branchInfo.branches).length === 0) {
|
|
13
|
-
return '';
|
|
14
|
-
}
|
|
15
|
-
return Object.entries(branchInfo.branches).find(([name, info]) => info.current)[0];
|
|
16
|
-
};
|
|
17
|
-
const isProtected = async () => {
|
|
18
|
-
const theBranch = await getCurrentBranchName();
|
|
19
|
-
const protectedBranches = ['main', 'master', 'development'];
|
|
20
|
-
const additionalProtectedBranches = [...process.argv.slice(2)];
|
|
21
|
-
|
|
22
|
-
// Check if the current branch starts with any of the additional
|
|
23
|
-
// protected branch name
|
|
24
|
-
let matchesAdditionalBranch = false;
|
|
25
|
-
for (let i = 0; i < additionalProtectedBranches.length; i++) {
|
|
26
|
-
matchesAdditionalBranch = matchesAdditionalBranch || theBranch.startsWith(additionalProtectedBranches[i]);
|
|
27
|
-
}
|
|
28
|
-
return protectedBranches.includes(theBranch) || matchesAdditionalBranch;
|
|
29
|
-
};
|
|
30
|
-
const npmRunner = async script => {
|
|
31
|
-
try {
|
|
32
|
-
const results = await (0, _execa.default)('npm', ['run', script], {
|
|
33
|
-
stdio: 'inherit'
|
|
34
|
-
});
|
|
35
|
-
return results;
|
|
36
|
-
} catch (err) {
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
return undefined;
|
|
40
|
-
};
|
|
41
|
-
(async () => {
|
|
42
|
-
if (await isProtected()) {
|
|
43
|
-
const script = ['test', 'lint'];
|
|
44
|
-
for (let i = 0; i < script.length; i++) {
|
|
45
|
-
await npmRunner(script[i]); // eslint-disable-line no-await-in-loop
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
process.exit(0);
|
|
49
|
-
}
|
|
50
|
-
})();
|