mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 13:44:14 +01:00
cibuild: tag tagged build with latest when building docker image
This commit is contained in:
parent
93088a76cc
commit
a89c54dabf
@ -45,12 +45,10 @@ def branch():
|
||||
return travis_branch or appveyor_branch
|
||||
|
||||
|
||||
def docker_name():
|
||||
def docker_name(version="dev"):
|
||||
if tag():
|
||||
ver = tag()
|
||||
else:
|
||||
ver = "dev"
|
||||
return "spaam/svtplay-dl:{}".format(ver)
|
||||
version = tag()
|
||||
return "spaam/svtplay-dl:{}".format(version)
|
||||
|
||||
|
||||
def build_docker():
|
||||
@ -65,6 +63,14 @@ def build_docker():
|
||||
"docker", "push", docker_name()
|
||||
])
|
||||
|
||||
if tag():
|
||||
subprocess.check_output([
|
||||
"docker", "tag", docker_name(), docker_name("latest")
|
||||
])
|
||||
subprocess.check_call([
|
||||
"docker", "push", docker_name("latest")
|
||||
])
|
||||
|
||||
|
||||
def build_package():
|
||||
logger.info("Building python package")
|
||||
|
Loading…
Reference in New Issue
Block a user