Skip to content

Commit

Permalink
Add missing repo field
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushuk committed Feb 29, 2024
1 parent e203f02 commit 9681a37
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pros/cli/conductor_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ def purge_template(query: c.BaseTemplate, force):
@conductor.command('publish-template')
@click.argument('name')
@click.argument('version')
@click.argument('repository')
@click.argument('token')
@default_options
def publish_template(name: str, version: str, token: str):
def publish_template(name: str, version: str, repository: str, token: str):
"""
Publish a template to branchline
Expand All @@ -204,9 +205,9 @@ def publish_template(name: str, version: str, token: str):
exists = any([entry['name'] == name for entry in data])

if not exists:
new_template = {'metadata': {'versions': version_file_name}, 'name': name}
new_template = {'metadata': {'versions': version_file_name}, 'name': name, 'repository': repository}
data.append(new_template)
with open('pros-branchline/templates.json', 'w') as file:
with open('pros-branchline/pros-branchline.json', 'w') as file:
json.dump(data, file, indent=2)
versions = [{'metadata': {'location': f'https://pros.cs.purdue.edu/v5/_static/releases/{name}@{version}.zip'}, 'version': version}]
with open(version_file_name, 'w') as file:
Expand Down

0 comments on commit 9681a37

Please sign in to comment.