Version 1.0 is here! 🚀
Now Versify works with commands to create a branch, update the file in the repository and... wait for it...
Create a pull request directly from the CLI itself!
Important
You have to set a GitHub access token in order to use the CLI.
Go to the developer settings and then create a new GitHub access token (classic).
Give the token only the repository and SSO permissions and that should be enough.
Next, set the GITHUB_TOKEN as an environment variable in your system, then you'll be able to access the tool from anywhere in our PC.
If you don't want to install the tool from the source code, use the executable file located in the repository release folder and also add it to your path in the system environment.
First, install the crustacean language Rust.
The next step is to clone the repository and then cd versify
.
You may want to set the GITHUB_TOKEN by modifying the file .env.example (exclude .example locally), however if you already have set the GITHUB_TOKEN as a system environment varible, you can simply skip this step.
Finally, to install the CLI tool to your path just run:
cargo build --release && cargo install --path .
That's it? Yes, now you can use the tool to modify the version of any application 🤠
Help
versify --help
- list: List all branches of the repository
- download: Download packages.txt
- create-branch: Create a new branch
- update-branch: Update the package.txt in the created branch
- delete-branch: Delete a target branch
- create-pr: Create a new pull request
- list-pr: List all the open pull requests
- close-pr: Close current open pull request. You should use the pull request number for this matter
- update: Update the package.txt in your current PC (TO BE DEPRECATED)
To see the list of options for any command run versify <COMMAND> -h
versify list
versify download -b 23-9-x
Options
- -b, --branch : Choose the branch in the repository. By default, it'll pull the packages.txt from main
- -o, --output <OUTPUT_PATH>: Choose the output directory. By default, it'll create a new directory called "tmp" in the current working directory
- -h, --help: Print help
versify create-branch <SOURCE> <NEW_BRANCH>
SOURCE: The source branch that will be used as the base of the new branch
NEW_BRANCH: The name of your new branch
versify update-branch -m "This is a commit message" -t test-branch -d SSIV -v 1.7.2769.0
You can change several versions at once for different apps (comma separated).
The number of versions MUST match the number of domains to be changed, otherwise an error will be
thrown.
Options
- -m, --message : Commit message
- -t, --target-branch <TARGET_BRANCH>: Target branch to be updated
- -d, --domain : The name of the domain you want to modify. This is a list of valid domains: SATK, Mashup, SSC, SSIV, SCE, HCS, ImageImport, ImageDiscovery, SciStream, Metastore
- -v, --version <BUILD_NUMBER>: The build number of the apps, e.g. 4.0.8.10268
- -h, --help: Print help
Optional - -p, --path : Path to the file directory (Only if you want to update the versions using a file in your PC instead of modifying directly in the repo)
versify delete-branch <BRANCH>
BRANCH: Branch to be deleted
versify create-pr -t "This is the PR title" -m "This is the message body of the PR" --branch test-branch --target-branch 23-9-x
Options
- -t, --title <TITLE>: Pull request title
- -m, --message : Pull request body message
- --branch : Source branch (i.e. your current working branch)
- --target-branch <TARGET_BRANCH>: Target branch (i.e. the branch where the changes will be merged)
- -h, --help: Print help
versify list-pr
It will return a list of pull requests with the following structure:
- Pull request title
- Author
- url
- State
- Created at
- Updated at
versify close-pr <PR_NUMBER>
PR_NUMBER: Pull request number you want to close
versify -p C:\<PATH>\packages.txt -d SSC,SCE,SATK -b 4.0.8.333,1.6.4.5,5.3.33
Options
- -p, --path : Path to the file directory
- -d, --domain : The name of the domain you want to modify. This is a list of valid domains: SATK, Mashup, SSC, SSIV, SCE, HCS, ImageImport, ImageDiscovery, SciStream, Metastore
- -b, --build-number <BUILD_NUMBER>: The build number of the apps, e.g. 4.0.8.10268
- -o, --output <OUTPUT_PATH>: Choose the output directory. By default, it'll create a new directory called "output" in the current working directory
- -h, --help: Print help
Create a new branch and a pull request using GitHub APIAdd option to select a desired output directory- Integration with Jenkins (maybe)