feat(runner): add parallel building

This commit is contained in:
Haoyu Xu
2023-01-20 17:21:08 -05:00
parent 580ad1d18d
commit 4decb3d605
9 changed files with 117 additions and 95 deletions

View File

@@ -4,12 +4,12 @@ import { read as readYAML } from './yaml.js'
import { mkdir, writeSync } from './file.js'
import { appendMainConfig } from './append.js'
export default function init(extractedDir) {
export default function init(operatorName, extractedDir) {
mkdir(extractedDir)
const date = new Date()
const template = readYAML(path.join(__dirname, 'config', '_template.yaml'))
template.link = __operator_name
template.link = operatorName
template.date = `${date.getFullYear()}/${(date.getMonth() + 1).toString().padStart(2, '0') }`
writeSync(stringify(template), path.join(__dirname, 'config', `${__operator_name}.yaml`))
appendMainConfig(__operator_name, __dirname)
writeSync(stringify(template), path.join(__dirname, 'config', `${operatorName}.yaml`))
appendMainConfig(operatorName)
}