From fd8086dd1de9c2d34f82a90eda27cfd934afd2e4 Mon Sep 17 00:00:00 2001 From: Jon Clucas Date: Mon, 17 Apr 2023 10:05:12 -0400 Subject: [PATCH] :alien: PEP440 --- .github/workflows/on_push.yml | 2 +- CHANGELOG.md | 1 + CPAC/info.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index 73c92e4888..3789236eb2 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -57,7 +57,7 @@ jobs: if [[ ! "$COMMIT_MESSAGE" == *"Update version to"* ]] then cd CPAC - VERSION=$(python -c "from info import __version__; print('.'.join(('.'.join(__version__[::-1].split('-')[1].split('.')[1:])[::-1], __version__.split('-')[1])) if '-' in __version__ else __version__)") + VERSION=$(python -c "from info import __version__; print(('.'.join(('.'.join(__version__[::-1].split('-')[1].split('.')[1:])[::-1], __version__.split('-')[1])) if '-' in __version__ else __version__).split('+', 1)[0])") cd .. echo "v${VERSION}" > version find ./CPAC/resources/configs -name "*.yml" -exec sed -i -r "s/^(# [Vv]ersion ).*$/# Version ${VERSION}/g" {} \; diff --git a/CHANGELOG.md b/CHANGELOG.md index aee5dbe87e..0c095bad8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Updates develop version numbers to adhere to [PEP440](https://peps.python.org/pep-0440) by changing `{major}.{minor}.{patch}.{SHA}-{dev}` to `{major}.{minor}.{patch}.dev{integer}+{SHA}` - Adds checksum steps to `curl`d steps in Docker build process (for standard and `lite` images) - Makes in-container root directory writable by all diff --git a/CPAC/info.py b/CPAC/info.py index 2d3551c87a..baa503ac1f 100644 --- a/CPAC/info.py +++ b/CPAC/info.py @@ -82,7 +82,7 @@ def get_cpac_gitversion(): if 'dev' in _version_extra: gitversion = get_cpac_gitversion() if gitversion: - _version_extra = gitversion + '-' + 'dev' + _version_extra = f'dev1+{gitversion}' __version__ = "%s.%s.%s" % (_version_major,