fix: Made versioning independent, now 0.1.0.

main
Sofus Albert Høgsbro Rose 2023-08-13 22:47:20 +02:00
parent d08f7691ab
commit d978a92c97
Signed by: so-rose
GPG Key ID: AD901CB0F3701434
1 changed files with 1 additions and 21 deletions

22
run.py
View File

@ -40,7 +40,7 @@ CMD_DEPENDENCIES = [
] ]
IMAGE_NAME = "docker-mdbook" IMAGE_NAME = "docker-mdbook"
IMAGE_VERSION = ("0", "4", "34") IMAGE_VERSION = ("0", "1", "0")
REGISTRY_HOST = "git.sofus.io" REGISTRY_HOST = "git.sofus.io"
REGISTRY_USER = "python-support" REGISTRY_USER = "python-support"
@ -143,23 +143,6 @@ def cmd_exists(cmd: str) -> bool:
return shutil.which(cmd) is not None return shutil.which(cmd) is not None
####################
# - Checks
####################
def check_mdbook_version_matches() -> None:
with cd_script_dir():
with open('Dockerfile', 'r') as f:
mdbook_version_lines = [
line for line in f.readlines()
if line.strip() == f'ARG MDBOOK_VERSION="{".".join(IMAGE_VERSION)}"'
]
if not len(mdbook_version_lines) == 1:
print("IMAGE_VERSION doesn't match MDBOOK_VERSION")
sys.exit(1)
#################### ####################
# - Actions # - Actions
#################### ####################
@ -227,9 +210,6 @@ def action_publish() -> None:
# - Script # - Script
#################### ####################
if __name__ == "__main__": if __name__ == "__main__":
# Check version match w/MDBOOK in Dockerfile
check_mdbook_version_matches()
# Check Available Commands # Check Available Commands
for cmd in CMD_DEPENDENCIES: for cmd in CMD_DEPENDENCIES:
if not cmd_exists(cmd) : if not cmd_exists(cmd) :