diff --git a/README.md b/README.md index a8cbe0cb27..bb30d9133f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/inventree/inventree) ![CI](https://github.com/inventree/inventree/actions/workflows/qc_checks.yaml/badge.svg) -![Docker Build](https://github.com/inventree/inventree/actions/workflows/docker_latest.yaml/badge.svg) +![Docker Build](https://github.com/inventree/inventree/actions/workflows/docker.yaml/badge.svg) [![Coveralls](https://img.shields.io/coveralls/github/inventree/InvenTree)](https://coveralls.io/github/inventree/InvenTree) [![Crowdin](https://badges.crowdin.net/inventree/localized.svg)](https://crowdin.com/project/inventree) diff --git a/ci/check_version_number.py b/ci/check_version_number.py index 27120ff55a..39886e55bf 100644 --- a/ci/check_version_number.py +++ b/ci/check_version_number.py @@ -53,7 +53,7 @@ if __name__ == '__main__': docker_tag = None if GITHUB_REF_TYPE == 'branch' and ('stable' in GITHUB_REF or 'stable' in GITHUB_BASE_REF): - print("Checking requirements for 'stable' release") + print("Checking requirements for 'stable' release branch:") pattern = r"^\d+(\.\d+)+$" result = re.match(pattern, version) @@ -66,8 +66,22 @@ if __name__ == '__main__': docker_tag = 'stable' - elif GITHUB_REF_TYPE == 'branch' and ('master' in GITHUB_REF or 'master' in GITHUB_BASE_REF): - print("Checking requirements for main development branch:") + elif GITHUB_REF_TYPE == 'tag': + # GITHUB_REF should be of th eform /refs/heads/ + version_tag = GITHUB_REF.split('/')[-1] + print(f"Checking requirements for tagged release - '{version_tag}':") + + if version_tag != version: + print(f"Version number '{version}' does not match tag '{version_tag}'") + sys.exit + + # TODO: Check if there is already a release with this tag! + + docker_tag = version_tag + + elif GITHUB_REF_TYPE == 'branch': + # Otherwise we know we are targetting the 'master' branch + print("Checking requirements for 'master' development branch:") pattern = r"^\d+(\.\d+)+ dev$" result = re.match(pattern, version) @@ -80,19 +94,6 @@ if __name__ == '__main__': docker_tag = 'latest' - elif GITHUB_REF_TYPE == 'tag': - # GITHUB_REF should be of th eform /refs/heads/ - version_tag = GITHUB_REF.split('/')[-1] - print(f"Checking requirements for tagged release - '{version_tag}'") - - if version_tag != version: - print(f"Version number '{version}' does not match tag '{version_tag}'") - sys.exit - - # TODO: Check if there is already a release with this tag! - - docker_tag = version_tag - else: print("Unsupported branch / version combination:") print(f"InvenTree Version: {version}")