Skip to content

Commit a1db42c

Browse files
committed
Fixing bug: no archive command without archive
1 parent 093e4c6 commit a1db42c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/hermes/commands/init/base.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ def __init__(self, parser: argparse.ArgumentParser):
216216
"deposit_zip_name": "artifact.zip",
217217
"deposit_zip_files": "",
218218
"deposit_initial": "--initial",
219-
"deposit_extra_files": "",
219+
"deposit_extra_files": "--file ???",
220220
"deposit_parameter_token": "-O ???.auth_token",
221+
"deposit_parameter_zip_file": "--file ???.zip",
221222
"deposit_token_name": "???_TOKEN",
222223
"gh_push_branches_or_tags": "branches",
223224
"gh_push_target": "main",
@@ -897,7 +898,8 @@ def set_push_trigger_to_tag(self, tag_pattern: str = "") -> None:
897898
Sets the CI parameters, so that the pipeline gets triggered when a tag that matches the pattern gets pushed.
898899
"""
899900
self.ci_parameters["gh_push_branches_or_tags"] = "tags"
900-
self.ci_parameters["git_create_curate_branch"] = 'git checkout -b "hermes/curate-$SHORT_SHA" ${{ github.ref }}'
901+
self.ci_parameters["gh_create_curate_branch"] = 'git checkout -b "hermes/curate-$SHORT_SHA" ${{ github.ref }}'
902+
self.ci_parameters["gl_create_curate_branch"] = 'git checkout -b "$MR_TARGET_BRANCH" "$CI_COMMIT_REF_NAME"'
901903
if tag_pattern:
902904
self.ci_parameters["gh_push_target"] = f"\"{tag_pattern}\""
903905
self.ci_parameters["gl_push_condition"] = f"$CI_COMMIT_TAG =~ {tag_pattern}"
@@ -959,6 +961,10 @@ def choose_deposit_files(self) -> None:
959961
index = int(file_choice) - folder_base_index
960962
if 0 <= index < len(self.folder_info.dir_folders):
961963
self.ci_parameters["deposit_zip_files"] = self.folder_info.dir_folders[index]
964+
self.ci_parameters["deposit_parameter_zip_file"] = "--file " + self.ci_parameters["deposit_zip_name"]
965+
if self.ci_parameters["deposit_zip_files"] == "-":
966+
self.ci_parameters["deposit_parameter_zip_file"] = ""
967+
# Print selection to confirm
962968
sc.echo("Your upload will consist of the following:")
963969
if add_readme:
964970
sc.echo("\tUnzipped:", formatting=sc.Formats.BOLD)

0 commit comments

Comments
 (0)