mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-11 19:36:35 +00:00
Move metadata to pyproject.toml (#12770)
This commit is contained in:
parent
e61aa266a6
commit
f8303bff76
@ -26,8 +26,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
version() {
|
version() {
|
||||||
const version = fs
|
const version = fs
|
||||||
.readFileSync(path.resolve(paths.polymer_dir, "setup.cfg"), "utf8")
|
.readFileSync(path.resolve(paths.polymer_dir, "pyproject.toml"), "utf8")
|
||||||
.match(/version\W+=\W(\d{8}\.\d)/);
|
.match(/version\W+=\W"(\d{8}\.\d)"/);
|
||||||
if (!version) {
|
if (!version) {
|
||||||
throw Error("Version not found");
|
throw Error("Version not found");
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,30 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools~=60.5", "wheel~=0.37.1"]
|
requires = ["setuptools~=62.3", "wheel~=0.37.1"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "home-assistant-frontend"
|
||||||
|
version = "20220524.0"
|
||||||
|
license = {text = "Apache-2.0"}
|
||||||
|
description = "The Home Assistant frontend"
|
||||||
|
readme = "README.md"
|
||||||
|
authors = [
|
||||||
|
{name = "The Home Assistant Authors", email = "hello@home-assistant.io"}
|
||||||
|
]
|
||||||
|
requires-python = ">=3.4.0"
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
"Homepage" = "https://github.com/home-assistant/frontend"
|
||||||
|
|
||||||
|
[tool.setuptools]
|
||||||
|
platforms = ["any"]
|
||||||
|
zip-safe = false
|
||||||
|
include-package-data = true
|
||||||
|
|
||||||
|
[tool.setuptools.packages.find]
|
||||||
|
include = ["hass_frontend*"]
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
python_version = 3.4
|
||||||
|
show_error_codes = true
|
||||||
|
strict = true
|
||||||
|
@ -50,14 +50,14 @@ async function main(args) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const setup = fs.readFileSync("setup.cfg", "utf8");
|
const setup = fs.readFileSync("pyproject.toml", "utf8");
|
||||||
const version = setup.match(/\d{8}\.\d+/)[0];
|
const version = setup.match(/version\W+=\W"(\d{8}\.\d)"/)[1];
|
||||||
const newVersion = method(version);
|
const newVersion = method(version);
|
||||||
|
|
||||||
console.log("Current version:", version);
|
console.log("Current version:", version);
|
||||||
console.log("New version:", newVersion);
|
console.log("New version:", newVersion);
|
||||||
|
|
||||||
fs.writeFileSync("setup.cfg", setup.replace(version, newVersion), "utf-8");
|
fs.writeFileSync("pyproject.toml", setup.replace(version, newVersion), "utf-8");
|
||||||
|
|
||||||
if (!commit) {
|
if (!commit) {
|
||||||
return;
|
return;
|
||||||
|
26
setup.cfg
26
setup.cfg
@ -1,26 +0,0 @@
|
|||||||
[metadata]
|
|
||||||
name = home-assistant-frontend
|
|
||||||
version = 20220524.0
|
|
||||||
author = The Home Assistant Authors
|
|
||||||
author_email = hello@home-assistant.io
|
|
||||||
license = Apache-2.0
|
|
||||||
platforms = any
|
|
||||||
description = The Home Assistant frontend
|
|
||||||
long_description = file: README.md
|
|
||||||
long_description_content_type = text/markdown
|
|
||||||
url = https://github.com/home-assistant/frontend
|
|
||||||
|
|
||||||
[options]
|
|
||||||
packages = find:
|
|
||||||
zip_safe = False
|
|
||||||
include_package_data = True
|
|
||||||
python_requires = >= 3.4.0
|
|
||||||
|
|
||||||
[options.packages.find]
|
|
||||||
include =
|
|
||||||
hass_frontend*
|
|
||||||
|
|
||||||
[mypy]
|
|
||||||
python_version = 3.4
|
|
||||||
show_error_codes = True
|
|
||||||
strict = True
|
|
Loading…
x
Reference in New Issue
Block a user