3 releases
0.1.3 | Nov 23, 2023 |
---|---|
0.1.2 | Nov 23, 2023 |
0.1.1 | Oct 16, 2023 |
#6 in #gitlab-api
13KB
63 lines
Introduction
This project presents a tool for creating GitLab tags using the GitLab API. It's designed to automate the tagging process in GitLab repositories, making version control more efficient.
Requirements
- GitLab account with appropriate permissions.
- Private access token for GitLab API authentication.
Installation
To install gitlab_tagger
, use the following Cargo command:
cargo install gitlab_tagger
Usage
The tool requires the following arguments:
- Server URL (
-s
): The URL of your GitLab server. - Project ID (
-i
): The ID of your GitLab project. - Private Access Token (
-p
): Your GitLab private access token for API interaction. - Branch (
-b
): The branch for which to create the tag. - Previous Tag (
-t
): The latest tag in your project. - Commit Message (
-c
): The commit message should start with 'major', 'minor', or 'patch', followed by a colon and a short description.
Example of Usage
tagger -s "${CI_SERVER_URL}" -i "${CI_PROJECT_ID}" -p "${PRIVATE_TOKEN}" -b "${CI_DEFAULT_BRANCH}" -t "$(git describe --tags --abbrev=0)" -c "${CI_COMMIT_TITLE}"
How it Works
The script interacts with the GitLab API using the provided arguments to create a new tag. The new tag version is determined based on the previous tag and the change type (major, minor, patch) indicated in the commit message.
Contributing
Contributions are welcome. Fork the repository, make your changes, and submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Dependencies
~7–19MB
~274K SLoC