Skip to content

Commit

Permalink
Fix build.py to use correct default repo-tag on release branches (tri…
Browse files Browse the repository at this point in the history
  • Loading branch information
deadeyegoodwin authored Jun 29, 2021
1 parent 68d614b commit e08ea2f
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,22 @@ def container_build(images, backends, repoagents, endpoints):
FLAGS.version = vfile.readline().strip()

log('version {}'.format(FLAGS.version))

# Determine the default repo-tag that should be used for images,
# backends and repo-agents if a repo-tag is not given
# explicitly. For release branches we use the release branch as
# the default, otherwise we use 'main'.
default_repo_tag = 'main'
cver = FLAGS.container_version
if cver is None:
if FLAGS.version not in TRITON_VERSION_MAP:
fail(
'unable to determine default repo-tag, container version not known for {}'.format(
FLAGS.version))
cver = TRITON_VERSION_MAP[FLAGS.version][0]
if not cver.endswith('dev'):
default_repo_tag = 'r' + cver
log('default repo-tag: {}'.format(default_repo_tag))

# For other versions use the TRITON_VERSION_MAP unless explicitly
# given.
Expand All @@ -1253,10 +1268,6 @@ def container_build(images, backends, repoagents, endpoints):
log('upstream container version {}'.format(
FLAGS.upstream_container_version))

# Determine the default <repo-tag> based on container version.
if not FLAGS.container_version.endswith('dev'):
default_repo_tag = 'r' + FLAGS.container_version

# Initialize map of backends to build and repo-tag for each.
backends = {}
for be in FLAGS.backend:
Expand Down

0 comments on commit e08ea2f

Please sign in to comment.