mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 15:43:59 +00:00
fix
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
const rimraf = require('rimraf');
|
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
|
|
||||||
const indir = path.resolve(path.join(__dirname, '..', 'workflow-templates'));
|
const indir = path.resolve(path.join(__dirname, '..', 'workflow-templates'));
|
||||||
@@ -34,7 +33,7 @@ function conditionMatch(condition, args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function processJsonStep(json, args) {
|
function processJsonStep(json, args) {
|
||||||
return _.cloneDeepWith(value, x => {
|
return _.cloneDeepWith(json, value => {
|
||||||
if (_.isArray(value)) {
|
if (_.isArray(value)) {
|
||||||
const res = [];
|
const res = [];
|
||||||
for (const item of value) {
|
for (const item of value) {
|
||||||
@@ -71,7 +70,7 @@ function processJsonStep(json, args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_.isPlainObject(value)) {
|
if (_.isPlainObject(value)) {
|
||||||
if (_.intersection(args.allNames ?? [], Object.keys(values))?.length > 0) {
|
if (_.intersection(args.allNames ?? [], Object.keys(value))?.length > 0) {
|
||||||
modified = true;
|
modified = true;
|
||||||
return value[args.name];
|
return value[args.name];
|
||||||
}
|
}
|
||||||
@@ -118,8 +117,15 @@ function processFiles() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function run() {
|
function deleteOldFiles() {
|
||||||
await new Promise(resolve => rimraf(outdir, resolve));
|
const files = fs.readdirSync(outdir);
|
||||||
|
for (const file of files) {
|
||||||
|
fs.unlink(path.join(outdir, file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function run() {
|
||||||
|
deleteOldFiles();
|
||||||
readIncludes();
|
readIncludes();
|
||||||
processFiles();
|
processFiles();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
- _community: 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
- _community: 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
||||||
_premium: - 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
_premium: 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
Reference in New Issue
Block a user