https://github.com/aeyoll/wr
A Rust tool to deploy websites with ease, using git-flow and Gitlab CI/CD.
https://github.com/aeyoll/wr
ci-cd deploy deployment git git-flow gitlab release
Last synced: 6 months ago
JSON representation
A Rust tool to deploy websites with ease, using git-flow and Gitlab CI/CD.
- Host: GitHub
- URL: https://github.com/aeyoll/wr
- Owner: aeyoll
- License: mit
- Created: 2021-11-07T09:30:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-09T18:46:35.000Z (about 1 year ago)
- Last Synced: 2025-03-16T23:03:35.733Z (about 1 year ago)
- Topics: ci-cd, deploy, deployment, git, git-flow, gitlab, release
- Language: Rust
- Homepage:
- Size: 246 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# wr
[](https://github.com/aeyoll/wr/actions)
[](LICENSE)
[](#rust-version-requirements)
[](https://conventionalcommits.org)
A Rust tool to deploy websites with ease, using git-flow and Gitlab CI/CD.
Philosophy
---
Warning: personal opinion here.
While git-flow is not trendy _at all_, it still has advantages over GitHub flow for website deployment:
- clear distinction between production and development environments
- a strong usage of tags, providing an easy rollback mechanism
- a good convention for branch names
This tool is only intended to help to create and deploy new releases. Handling gitflow's features, hotfixes and bugfixes are (and will) not be covered.
Installation
---
To install wr, use the install-script and add `$HOME/.wr/bin` to your `$PATH`.
```shell
curl -fsSL https://raw.githubusercontent.com/aeyoll/wr/main/install.sh | bash
```
Environment variables:
- `WR_INSTALL` - Override install directory (e.g., `/usr/local`)
- `WR_TARGET` - Override target platform (e.g., `x86_64-unknown-linux-musl`)
Configuration
----
Setup some environment variables:
```sh
export GITLAB_HOST=gitlab.com # default to gitlab.com, but it can be a private instance
export GITLAB_TOKEN=glpat-012345678012345678 # GitLab access token with "api" rights
```
Usage
---
```
USAGE:
wr [FLAGS] [OPTIONS]
FLAGS:
--debug Print additional debug information
-d, --deploy Launch a deploy job after the release
-f, --force Allow to make a release even if the remote is up to date
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-e, --environment Define the deploy environment (default: "Production", available: "Production",
"Staging")
-s, --semver_type Define how to increment the version number (default: "Patch", available: "Patch",
"Minor", "Major")
```
Examples:
---
Create a staging release and deploy it:
```sh
wr --environment=staging --deploy
```
Create a production release, with logger level set at "debug", incrementing to the next minor version:
```sh
wr --semver_type=minor --debug
wr --environment=production --semver_type=minor --debug
# Those two lines are equivalent
```