fix: uptag
This commit is contained in:
parent
749ca3c620
commit
1c0c38b51c
1 changed files with 3 additions and 2 deletions
|
@ -47,10 +47,11 @@ const main = async () => {
|
||||||
const { name, key = cdKey, tag = defaultTag } = app;
|
const { name, key = cdKey, tag = defaultTag } = app;
|
||||||
const valuesFile = `apps/${name}/envs/${env}/values.yaml`;
|
const valuesFile = `apps/${name}/envs/${env}/values.yaml`;
|
||||||
console.log(`${valuesFile} -> ${key}=${tag}`);
|
console.log(`${valuesFile} -> ${key}=${tag}`);
|
||||||
const valuesRaw = await fs.readFile(`${workingDir}/${valuesFile}`, { encoding: "utf-8" })
|
const valuesFilePath = `${workingDir}/${valuesFile}`;
|
||||||
|
const valuesRaw = await fs.readFile(valuesFilePath, { encoding: "utf-8" })
|
||||||
const values = yaml.parse(valuesRaw);
|
const values = yaml.parse(valuesRaw);
|
||||||
set(values, key, tag);
|
set(values, key, tag);
|
||||||
await fs.writeFile(yaml.stringify(values), { encoding: "utf-8" });
|
await fs.writeFile(valuesFilePath, yaml.stringify(values));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue