Skip to content

Conversation

@ea-open-source
Copy link
Owner

@ea-open-source ea-open-source commented May 20, 2022

Motivation

Add move package upload command to upload move package to Movey, modify move package build command 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:

  • your package must be on Github
  • the remote must be named “origin”
  • file $HOME/.move/credential.toml must exist, and the content should be like:
[registry]
token = "cwagbNajttYGWjKymJdn9n2nq4yOYIpT"

Note: you could use the move login command 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 upload

Have 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

@ea-open-source ea-open-source changed the title upload metadata to movey Add command to upload metadata to Movey May 20, 2022
},
PackageCommand::Upload => {
let mut upload_request: UploadRequest = Default::default();
let mut output = Command::new("git")

Choose a reason for hiding this comment

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

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.

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.

3 participants