Crates.io | gitSource |
lib.rs | gitSource |
version | 0.0.1 |
source | src |
created_at | 2024-10-03 12:02:13.336295 |
updated_at | 2024-10-03 12:02:13.336295 |
description | Git CLI tool to update the server with the latest code |
homepage | https://github.com/archways404/ |
repository | https://github.com/archways404/gitsource |
max_upload_size | |
id | 1395148 |
size | 55,122 |
GitSource is a Rust CLI tool designed to manage versioning and synchronization of Git repositories. The tool automates fetching and updating Git repositories, comparing version information, and more.
init
: Initializes a gitSource.json
file that contains information about the Git repository, including username, repo name, branch, and version. If the file already exists, it will skip the initialization.update
: Increments the version number by updating the patch version (e.g., from 0.0.1
to 0.0.2
).update-major
: Increments the major version number (e.g., from 0.7.2
to 1.0.0
).fetch
: Compares the local version with the remote version fetched from GitHub, and runs git fetch
if the remote version is newer.cargo install gitSource@0.0.1
Use the init
subcommand to create a gitSource.json
file. If the file already exists, it won't prompt for input.
gs init
Use the update
subcommand to increment the patch version:
gs update
For example, this will change the version from 0.0.1
to 0.0.2
.
Use the update-major
subcommand to increment the major version:
gs update-major
For example, this will change the version from 0.7.2
to 1.0.0
.
Use the fetch
subcommand to compare the local version with the remote version. If the remote version is newer, it will automatically fetch the updates:
gs fetch
To install GitSource, follow these steps:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustc --version
cargo --version
cargo install gitSource@0.0.1
gs [argument]
git clone https://github.com/yourusername/gitsource.git
cd gitsource
cargo build --release
sudo mv target/release/gs /usr/local/bin/
Now, you can use the gs
command from anywhere on your system.
Contributions are welcome! Feel free to fork the repository and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.