Coder Social home page Coder Social logo

cargo-set-registry's Introduction

cargo-set-registry

A tool, based on and heavily pulling from cargo-edit, for modifying the registry on a set of dependencies in a workspace.

Install

cargo install --path .

Usage

Usage: cargo set-registry [OPTIONS] <REGISTRY>

Arguments:
  <REGISTRY>  Registry to update dependency to

Options:
      --manifest-path <PATH>  Path to the manifest to upgrade
  -p, --package <PKGID>       Package id of the crate to change the registry of
      --dry-run               Print changes to be made without making them
      --exclude <EXCLUDE>     Exclude a crate from the modification
      --locked                Require `Cargo.toml` to be up to date
  -h, --help                  Print help
cargo set-registry -p <dependency to update> <registry id> --dry-run

Example

Given the following dependency in n number of workspaces in a project.

[dependencies]
some_dep = { version = "0.1.0" }

Running a dry run modification to add an internal registry id would output the following without making changes:

cargo set-registry -p 'some_dep' 'internal' --dry-run
    Updating some_dep's dependency to add registry "internal"
warning: aborting set-registry due to dry run

Finally the changes can be applied with:

cargo set-registry -p 'some_dep' 'internal'
    Updating some_dep's dependency to add registry "internal"

Which will yield the following in place change to all sub crates

[dependencies]
some_dep = { version = "0.1.0" , registry = "internal" }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.