From 243fd2d199ed3c7c5b16bd8bb899fbfdc507065c Mon Sep 17 00:00:00 2001 From: Akuli Date: Sun, 31 Jul 2022 23:18:45 +0300 Subject: [PATCH] Fix release script --- README.md | 4 ++-- scripts/release.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9b201ab00..707b72602 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Open a terminal and run these commands: python3 -m pip install --user --upgrade pip wheel python3 -m venv porcupine-venv source porcupine-venv/bin/activate - python3 -m pip install https://github.com/Akuli/porcupine/archive/v0.99.2.zip + python3 -m pip install https://github.com/Akuli/porcupine/archive/v0.99.02.zip porcu If you want to leave Porcupine running and use the same terminal for something else, @@ -74,7 +74,7 @@ Then run these commands: python3 -m pip install --user --upgrade pip wheel python3 -m venv porcupine-venv source porcupine-venv/bin/activate - python3 -m pip install https://github.com/Akuli/porcupine/archive/v0.99.2.zip + python3 -m pip install https://github.com/Akuli/porcupine/archive/v0.99.02.zip porcu If you want to leave Porcupine running and use the same terminal for something else, diff --git a/scripts/release.py b/scripts/release.py index 09252b45f..cfdeee4eb 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -11,7 +11,6 @@ from porcupine import version_info as old_info TAG_FORMAT = "v%d.%02d.%02d" -OLD_TAG_FORMAT = "v%d.%d.%d" # TODO: delete after the first calver release def replace_in_file(path, old, new): @@ -39,11 +38,11 @@ def main(): assert changelog.split("\n\n\n")[1].startswith("## Unreleased") assert changelog.count("Unreleased") == 1 - print(f"Version changes: {OLD_TAG_FORMAT % old_info} ---> {TAG_FORMAT % new_info}") + print(f"Version changes: {TAG_FORMAT % old_info} ---> {TAG_FORMAT % new_info}") replace_in_file(Path("CHANGELOG.md"), "Unreleased", TAG_FORMAT % new_info) replace_in_file(Path("porcupine/__init__.py"), repr(old_info), repr(new_info)) - replace_in_file(Path("README.md"), OLD_TAG_FORMAT % old_info, TAG_FORMAT % new_info) + replace_in_file(Path("README.md"), TAG_FORMAT % old_info, TAG_FORMAT % new_info) subprocess.check_call(["git", "add", "porcupine/__init__.py", "README.md", "CHANGELOG.md"]) subprocess.check_call(["git", "commit", "-m", f"Version {TAG_FORMAT % new_info}"]) subprocess.check_call(["git", "tag", TAG_FORMAT % new_info])