This commit is contained in:
Jörn-Michael Miehe 2021-10-13 02:16:09 +02:00
parent e42b426f2e
commit c08d44edb3
4 changed files with 15 additions and 14 deletions

View file

@ -6,7 +6,8 @@ this_dir="$(dirname "${this}")"
git_branch="$(git rev-parse --abbrev-ref HEAD)"
git_tag="$(git describe --abbrev=0)"
version_str="${git_branch##*/}"
version_str="0.2.0"
echo "${version_str}" > "${this_dir}/kiwi_scp/data/etc/version_tag"
sed -ri "s/(version\s*:).*$/\1 '${version_str}'/" "${this_dir}/example/kiwi.yml"
sed -ri "s/(version\s*=\s*).*$/\1\"${version_str}\"/" "${this_dir}/pyproject.toml"
sed -ri "s/(version\s*:).*$/\1 '${version_str}'/" "${this_dir}/../example/kiwi.yml"
sed -ri "s/(version\s*=\s*).*$/\1\"${version_str}\"/" "${this_dir}/../pyproject.toml"
sed -ri "s/(version.*=\s*).*$/\1\"${version_str}\"/" "${this_dir}/../kiwi_scp/config.py"

View file

@ -10,7 +10,7 @@ _RE_NUMBER: str = r"[0-9]|[1-9][0-9]*"
# regex for a semantic version string
RE_SEMVER = rf"^{_RE_NUMBER}(?:\.{_RE_NUMBER}(?:\.{_RE_NUMBER})?)?$"
# regex for a lowercase variable name
# regex for a variable name
RE_VARNAME = r"^[A-Za-z](?:[A-Za-z0-9\._-]*[A-Za-z0-9])$"
#############

View file

@ -58,22 +58,22 @@ class Config(BaseModel):
version: constr(regex=RE_SEMVER) = "0.2.0"
shells: Optional[List[str]] = [
"/bin/bash",
shells: Optional[List[Path]] = [
Path("/bin/bash"),
]
environment: Dict[str, Optional[str]] = {}
projects: Optional[List[_Project]]
storage: _Storage = _Storage.parse_obj({
"directory": "/var/local/kiwi",
})
storage: _Storage = _Storage(
directory="/var/local/kiwi",
)
network: _Network = _Network.parse_obj({
"name": "kiwi_hub",
"cidr": "10.22.46.0/24",
})
network: _Network = _Network(
name="kiwi_hub",
cidr="10.22.46.0/24",
)
@validator("environment", pre=True)
@classmethod

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "kiwi-scp"
version = "0.1.7"
version = "0.2.0"
description = "kiwi is the simple tool for managing container servers."
authors = ["ldericher <40151420+ldericher@users.noreply.github.com>"]