Open
Conversation
sblackshear
reviewed
May 25, 2022
| }, | ||
| PackageCommand::Upload => { | ||
| let mut upload_request: UploadRequest = Default::default(); | ||
| let mut output = Command::new("git") |
There was a problem hiding this comment.
I'm wondering if this can reuse the package manager's code for downloading from github: https://github.com/move-language/move/blob/main/language/tools/move-package/src/resolution/resolution_graph.rs#L517
Owner
Author
There was a problem hiding this comment.
Do you mean we should go with map_err instead of unwrap like in the code you linked, OR do you mean we should try to reuse the function download_and_update_if_repo, in which case not necessary because here we are querying info from the local (already fetched) repo.
Add Movey api token to upload command.
This was referenced Jun 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add
move package uploadcommand to upload move package to Movey, modifymove package buildcommand to call Movey API to increase download count.How to use it
Before you use the new command to upload metadata to Movey, please make sure:
Note: you could use the
move logincommand from this PR to save your Movey's api token using the CLI.Step 1: Navigate to the folder containing your package.
Step 2: Run the following command:
move package uploadHave you read the Contributing Guidelines on pull requests?
Yes
Test Plan
cargo test --package move-cli --test cli_tests upload_package -- --test-threads 1
cargo test --package move-cli --lib get_api_token -- --test-threads 1