Skip to content

Commit

Permalink
[TECH-713] Take tag into account for artifacts and build status cli c…
Browse files Browse the repository at this point in the history
…ommands

branch: featute/TECH-713-fix-tag-builds
  • Loading branch information
Jorg88 committed Dec 12, 2023
1 parent 1f45980 commit 3d59751
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/mpyl/cli/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,7 @@ def status(obj: CliContext, all_, projects):
try:
upgrade_check = asyncio.wait_for(warn_if_update(obj.console), timeout=3)
parameters = MpylCliParameters(
local=sys.stdout.isatty(),
all=all_,
projects=projects,
local=sys.stdout.isatty(), all=all_, projects=projects
)
print_status(obj, parameters)
except asyncio.exceptions.TimeoutError:
Expand Down Expand Up @@ -489,7 +487,9 @@ def artifacts():
@click.pass_obj
def pull(obj: CliContext, tag: str, pr: int, path: Path):
run_properties = initiate_run_properties(
config=obj.config, properties=obj.run_properties
config=obj.config,
properties=obj.run_properties,
cli_parameters=MpylCliParameters(tag=tag),
)
target_branch = __get_target_branch(run_properties, tag, pr)

Expand Down Expand Up @@ -518,7 +518,9 @@ def pull(obj: CliContext, tag: str, pr: int, path: Path):
@click.pass_obj
def push(obj: CliContext, tag: str, pr: int, path: Path, artifact_type: str):
run_properties = initiate_run_properties(
config=obj.config, properties=obj.run_properties
config=obj.config,
properties=obj.run_properties,
cli_parameters=MpylCliParameters(tag=tag),
)
target_branch = __get_target_branch(run_properties, tag, pr)

Expand Down
2 changes: 1 addition & 1 deletion src/mpyl/steps/run_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def initiate_run_properties(
all_projects=all_projects,
changes_in_branch=(
repo.changes_in_branch_including_local()
if cli_parameters.local
if cli_parameters.local or properties["versioning"].get("tag")
else (
repo.changes_in_tagged_commit(cli_parameters.tag)
if cli_parameters.tag
Expand Down

0 comments on commit 3d59751

Please sign in to comment.