Skip to content

A CLI tool to automate the task of updating dependency's version to the specified version

License

Notifications You must be signed in to change notification settings

tanay13/version-manager-cli

Repository files navigation

Open in Visual Studio Code


Logo

Version Manager CLI

A CLI tool to automatically creating PR for updated version of the specified dependency
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Version Manager is a CLI tool writted in nodejs to update projects specified dependencies to the given version. Using Command Line Interface we can input the csv file and the package@version. After taking the above values the tool will use github API to fetch the content of package.json of all the given repos. It will then perform a version check to check whether the version present in the repo is greater than or equal to the given version. Accordingly we then write the datas in the same csv file.

The tool will fork the remote project and create a new version-update branch in it. In the version-update branch the package.json file will be modified and a PR will be created for the default branch of the remote repo.

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Run the following command in you command line to get the latest version of NPM

  • npm
    npm install npm@latest -g

Installation

  1. Get a free personal access token at https://github.com/settings/tokens

  2. Clone the repo

    git clone https://github.com/dyte-submissions/dyte-vit-2022-tanay13.git
  3. navigate to the directory

    cd dyte-vit-2022-tanay13
  4. Install NPM packages

    npm install
  5. Create an .env file and enter the following data

    GITHUB_TOKEN=${YOUR_TOKEN}
    
    
  6. Link the CLI locally

    npm link

(back to top)

Usage

After Linking the tool. Use the given commands

  • To get the version
    version-manager --version
  • image

  • Input CSV

  • image

  • To take input of the csv and package version

  • version-manager -i /path/of/csvfile packageName@version
  • Example

  • image

  • CSV file state

  • image


  • To take the input and open a PR for the outdated versions

  • version-manager -u -i /path/of/csvfile packageName@version
  • Example

  • image

  • CSV file state

  • image

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @twitter_handle - [email protected]

Project Link: https://github.com/dyte-submissions/dyte-vit-2022-tanay13

(back to top)

(back to top)

About

A CLI tool to automate the task of updating dependency's version to the specified version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published