Move to setup.cfg and config for build-system (#11484)

This commit is contained in:
Marc Mueller
2022-01-29 06:18:17 +01:00
committed by GitHub
parent 730e9b144d
commit ce0ced0b6a
8 changed files with 38 additions and 22 deletions

View File

@ -11,6 +11,6 @@ yarn install
script/build_frontend
rm -rf dist
python3 setup.py -q sdist
rm -rf dist home_assistant_frontend.egg-info
python3 -m build
python3 -m twine upload dist/* --skip-existing

View File

@ -50,14 +50,14 @@ async function main(args) {
return;
}
const setup = fs.readFileSync("setup.py", "utf8");
const setup = fs.readFileSync("setup.cfg", "utf8");
const version = setup.match(/\d{8}\.\d+/)[0];
const newVersion = method(version);
console.log("Current version:", version);
console.log("New version:", newVersion);
fs.writeFileSync("setup.py", setup.replace(version, newVersion), "utf-8");
fs.writeFileSync("setup.cfg", setup.replace(version, newVersion), "utf-8");
if (!commit) {
return;