go-semver-release

command module
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: MIT Imports: 3 Imported by: 0

README

GitHub Tag GitHub go.mod Go version Go Reference GitHub Actions Workflow Status Go Report Card Codecov GitHub License

Go Semver Release

Go program designed to automate versioning of Git repository by analyzing their formatted commit history and tagging them with the right semver number.

Motivation

This project was built to create a lightweight and simple tool to seamlessly automate the semantic versioning on your Git repository in a language and CI agnostic way.

Following the UNIX philosophy of "make each program do one thing well", it only handles publishing semver tags to your Git repository, no package publishing or any other features.

All you need have is an initialized Git repository, a release branch (e.g., main) and a formatted commit history on that branch following the Conventional Commit specification. Many IDEs support plugins to help in formatting your commit messages (e.g., VSCode, IntelliJ).

[!IMPORTANT] go-semver-release can only read annotated Git tags. If at some point you need to manually add a semver tag your repository, make sure it is annotated, otherwise the program will not be able to detect it.

Install

If Go is installed on your machine, you can install from source:

$ go install github.com/s0ders/go-semver-release@latest
$ go-semver-release --help

For cross-platform compatibility, you can use the generated Docker image:

$ docker pull s0ders/go-semver-release:latest
$ docker run --rm s0ders/go-semver-release --help

Usage

Documentation about the CLI usage can be found here.

CI workflow examples

This tool is voluntarily agnostic of which CI tool is used with it. Examples of workflows with various CI tools can be found here.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
ci
Package ci provides function to generate output for CI/CD pipelines.
Package ci provides function to generate output for CI/CD pipelines.
gpg
Package gpg provides function to deal with GPG armored keys.
Package gpg provides function to deal with GPG armored keys.
parser
Package parser provides functions to parse a Git repository commit history.
Package parser provides functions to parse a Git repository commit history.
rules
Package rules provides functions to deal with release rules.
Package rules provides functions to deal with release rules.
semver
Package semver provides basic primitives to work with semantic version numbers.
Package semver provides basic primitives to work with semantic version numbers.
tag
Package tag provides function to work with Git tags.
Package tag provides function to work with Git tags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL