Remove v prefix from generated version numbers to stop things breaking and keep with Docker conventions
This commit is contained in:
parent
cb4844181b
commit
3a270cf02a
2 changed files with 2 additions and 1 deletions
|
@ -16,5 +16,5 @@ buildAndPush:
|
|||
- "echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin"
|
||||
- "docker info"
|
||||
script:
|
||||
- "docker build . --file Dockerfile --tag ${CI_REGISTRY_IMAGE}:latest --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
|
||||
- "docker build . --file Dockerfile --tag ${CI_REGISTRY_IMAGE}:latest --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG#'v'}" # that weird thing #'v' thing strips a prefix of v
|
||||
- "docker push --all-tags $CI_REGISTRY_IMAGE"
|
|
@ -2,6 +2,7 @@
|
|||
import sys
|
||||
|
||||
VERSION = sys.argv[1]
|
||||
VERSION = VERSION[1:] if VERSION.lower().startswith("v") else VERSION
|
||||
|
||||
def do_substitution(input_filename: str, output_filename: str):
|
||||
with open(input_filename) as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue