Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying the priority with addrepo subcommand #116

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

nguyen-phillip
Copy link
Collaborator

Don't write priority field in repo config if not specified.
Unspecified priorities are always interpreted as the default value.
Marshal priority values with semantic names when appropriate.
Add tests for writeRepoFile.

Looks like:

% googet -root=/tmp addrepo --file temp.repo foo https://googet.server.com/foo     
Wrote repo file /tmp/repos/temp.repo with content:
- name: foo
  url: https://googet.server.com/foo
  useoauth: false

% googet -root=/tmp addrepo --file temp.repo --priority rollback bar https://googet.server.com/bar     
Appended to repo file /tmp/repos/temp.repo with the following content:
- name: bar
  url: https://googet.server.com/bar
  useoauth: false
  priority: rollback

% cat /tmp/repos/temp.repo 
- name: foo
  url: https://googet.server.com/foo
  useoauth: false
- name: bar
  url: https://googet.server.com/bar
  useoauth: false
  priority: rollback

Don't write priority field in repo config if not specified.
Unspecified priorities are always interpreted as the default value.
Marshal priority values with semantic names when appropriate.
Add tests for writeRepoFile.
@adjackura adjackura merged commit 04653e5 into google:master Jul 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants