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

feat: support specifying distribution spec in discover, cp and manifest push commands #757

Merged
merged 10 commits into from
Jan 20, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Jan 20, 2023

Resolves #756

Signed-off-by: Billy Zha jinzha1@microsoft.com

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2023

Codecov Report

Merging #757 (37b1e22) into main (45e96a7) will increase coverage by 0.17%.
The diff coverage is 21.87%.

@@            Coverage Diff             @@
##             main     #757      +/-   ##
==========================================
+ Coverage   63.68%   63.86%   +0.17%     
==========================================
  Files          19       19              
  Lines         705      714       +9     
==========================================
+ Hits          449      456       +7     
  Misses        225      225              
- Partials       31       33       +2     
Impacted Files Coverage Δ
cmd/oras/internal/option/spec.go 0.00% <0.00%> (ø)
cmd/oras/internal/option/target.go 20.00% <0.00%> (+0.89%) ⬆️
cmd/oras/internal/option/remote.go 66.85% <46.66%> (-0.62%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah requested a review from shizhMSFT January 20, 2023 03:10
@qweeah qweeah marked this pull request as ready for review January 20, 2023 03:10
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@shizhMSFT shizhMSFT added this to the v1.0.0-rc.1 milestone Jan 20, 2023
cmd/oras/internal/option/spec.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/cp.go Outdated Show resolved Hide resolved
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Comment on lines 67 to 69
func generatePrefix(prefix, description string) (flagPrefix, notePrefix string) {
return prefix + "-", description + " "
}
Copy link
Contributor

@shizhMSFT shizhMSFT Jan 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func generatePrefix(prefix, description string) (flagPrefix, notePrefix string) {
return prefix + "-", description + " "
}
func applyPrefix(prefix, description string) (flagPrefix, notePrefix string) {
if prefix == "" {
return "", ""
}
return prefix + "-", description + " "
}

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit 78b365b into oras-project:main Jan 20, 2023
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
…st push commands (oras-project#757)

Resolves oras-project#756 

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

add --distribution-spec flag to artifact-related commands
3 participants