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

Use cargo vendor for mirroring selected crates #71

Merged

Conversation

wcampbell0x2a
Copy link
Member

@wcampbell0x2a wcampbell0x2a commented Jul 17, 2022

Add give a path to a folder created from cargo-vendor, which contains a folder of
all crates that can be easily parsed while letting cargo-vendor do the
hard job of grabbing the correct depends.

The code then walks that directory looking for crate name and the version, and only downloads
those specific crates from crates.io.

See #63

Example usage

$ cd panamax
$ cargo vendor
$ cargo r --release -- init offline-mirror
$ cargo r --release -- sync offline-mirror vendor/

NOTE: Since this compares only the diff between the previous git grab of crates.io, before grabbing new version / new crates for the offline mirror you need to rm -rf offline-mirror/crates.io-index/ to ensure all crates are compared every time and depends are correctly downloaded.

Add give a path to a folder created from cargo-vendor, which contains a folder of
all crates that can be easily parsed while letting cargo-vendor do the
hard job of grabbing the correct depends.

The code then walks that directory looking for crate name and the version, and only downloads
those specific crates from crates.io.
@k3d3
Copy link
Member

k3d3 commented Jul 30, 2022

Awesome, looks good to me! Also thank you for updating some of the format strings in the process!

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