Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/devbeno/starter


https://github.com/devbeno/starter

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# starter

[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.48.0+-lightgray.svg)](#rust-version-requirements)

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 creating and deploy new releases. Handling gitflow's features, hotfixes and bugfixes are (and will) not be covered.

Installation
---

To install starter, run:

```sh
cargo install starter
```

Configuration
----

Setup some environment variables:

```sh
export STARTER_GITLAB_HOST=gitlab.com # default to gitlab.com, but it can be a private instance
export STARTER_GITLAB_TOKEN=glpat-012345678012345678 # GitLab access token with "api" rights
```

Usage
---

```
USAGE:
starter [FLAGS] [OPTIONS]

FLAGS:
-d, --deploy Launch a deploy job after the release

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
starter --environment=Staging --deploy
```

Create a production release, with logger level set at "debug", incrementing to the next minor version:

```sh
starter --semver_type=Minor --debug
starter --environment=Production --semver_type=Minor --debug
# Those two lines are equivalent
```