Update README.md (#3094)

* Update README.md

Fix docker build status badge

* Simplify version check script
This commit is contained in:
Oliver 2022-05-29 17:41:14 +10:00 committed by GitHub
parent deacf207ff
commit 2fcf627c88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 17 deletions

View File

@ -6,7 +6,7 @@
<!-- Badges --> <!-- Badges -->
[![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) [![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) ![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) [![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) [![Crowdin](https://badges.crowdin.net/inventree/localized.svg)](https://crowdin.com/project/inventree)

View File

@ -53,7 +53,7 @@ if __name__ == '__main__':
docker_tag = None docker_tag = None
if GITHUB_REF_TYPE == 'branch' and ('stable' in GITHUB_REF or 'stable' in GITHUB_BASE_REF): 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+)+$" pattern = r"^\d+(\.\d+)+$"
result = re.match(pattern, version) result = re.match(pattern, version)
@ -66,8 +66,22 @@ if __name__ == '__main__':
docker_tag = 'stable' docker_tag = 'stable'
elif GITHUB_REF_TYPE == 'branch' and ('master' in GITHUB_REF or 'master' in GITHUB_BASE_REF): elif GITHUB_REF_TYPE == 'tag':
print("Checking requirements for main development branch:") # GITHUB_REF should be of th eform /refs/heads/<tag>
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$" pattern = r"^\d+(\.\d+)+ dev$"
result = re.match(pattern, version) result = re.match(pattern, version)
@ -80,19 +94,6 @@ if __name__ == '__main__':
docker_tag = 'latest' docker_tag = 'latest'
elif GITHUB_REF_TYPE == 'tag':
# GITHUB_REF should be of th eform /refs/heads/<tag>
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: else:
print("Unsupported branch / version combination:") print("Unsupported branch / version combination:")
print(f"InvenTree Version: {version}") print(f"InvenTree Version: {version}")