All Projects → stevenmatthewt → semantics

stevenmatthewt / semantics

Licence: other
A utility written in Golang to automatically handle Semantic Versioning in a CI environment.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to semantics

Ngc
NewGoCommand - An opinionated and lightweight project starter. (WORK IN PROGRESS)
Stars: ✭ 16 (-15.79%)
Mutual labels:  semantic-versioning
Semver
Semantic versioning helper library for PHP
Stars: ✭ 144 (+657.89%)
Mutual labels:  semantic-versioning
next-ver
Tells you the next semantic version for your local package
Stars: ✭ 27 (+42.11%)
Mutual labels:  semantic-versioning
Gradle Semantic Build Versioning
Gradle plugin to generate version-numbers and tags using semantic versioning
Stars: ✭ 69 (+263.16%)
Mutual labels:  semantic-versioning
Poetry Dynamic Versioning
Plugin for Poetry to enable dynamic versioning based on VCS tags
Stars: ✭ 131 (+589.47%)
Mutual labels:  semantic-versioning
Docker Makefile
Makefile for building docker repository releases
Stars: ✭ 204 (+973.68%)
Mutual labels:  semantic-versioning
Commitizen
Create committing rules for projects 🚀 auto bump versions ⬆️ and auto changelog generation 📂
Stars: ✭ 477 (+2410.53%)
Mutual labels:  semantic-versioning
semantic-commit-hook
Git hook that enforces semantic commit messages.
Stars: ✭ 34 (+78.95%)
Mutual labels:  semantic-versioning
Cz Cli
The commitizen command line utility. #BlackLivesMatter
Stars: ✭ 12,671 (+66589.47%)
Mutual labels:  semantic-versioning
octoclairvoyant-webapp
Compare GitHub changelogs across multiple releases in a single view.
Stars: ✭ 45 (+136.84%)
Mutual labels:  semantic-versioning
Dunamai
Dynamic versioning library and CLI
Stars: ✭ 85 (+347.37%)
Mutual labels:  semantic-versioning
Semantic Release
📦🚀 semantic-release written in go
Stars: ✭ 113 (+494.74%)
Mutual labels:  semantic-versioning
Libscout
LibScout: Third-party library detector for Java/Android apps
Stars: ✭ 217 (+1042.11%)
Mutual labels:  semantic-versioning
Rock
Create semantic version tags for your Go packages, search and discover new packages
Stars: ✭ 50 (+163.16%)
Mutual labels:  semantic-versioning
gradle-release-plugin
Gradle plugin providing very minimal release version numbering (Git-specific)
Stars: ✭ 43 (+126.32%)
Mutual labels:  semantic-versioning
Semver
Semantic Versioning (semver) library written in golang
Stars: ✭ 804 (+4131.58%)
Mutual labels:  semantic-versioning
Version
Represent and compare versions via semantic versioning (SemVer) in Swift
Stars: ✭ 160 (+742.11%)
Mutual labels:  semantic-versioning
versiontag
Bash command to automate tag semantic versioning
Stars: ✭ 40 (+110.53%)
Mutual labels:  semantic-versioning
gradle-versioner
Gradle Version Plugin. Generates semantic versions with git meta data per branch.
Stars: ✭ 25 (+31.58%)
Mutual labels:  semantic-versioning
git-semv
🔖 Git plugin for Semantic Versioning
Stars: ✭ 20 (+5.26%)
Mutual labels:  semantic-versioning

semantics

A utility written in Golang to automatically handle Semantic Versioning in a CI environment.

CircleCI

Install

go get github.com/stevenmatthewt/semantics

Use

First, you must have at least one release tag for your repo that follows Semantic Versioning. If this is a new repo, just create a release tag of v0.0.0. Then you're ready to do the following:

cd <your github repo>
semantics

Check out the wiki for more information on using semantics.

What it does

semantics is a command-line interface that is intended to be used in a CI environment (or manually, if you're desperate). It automatically handles the process of creating release tags for your project.

semantics relies an a particular commit message structure (completely customizable) to determine what version to create and then automatically creates a release tag and pushes it to GitHub. These release tags comply with Semantic Version 2.0.

At the moment, semantics only supports pushing release tags to GitHub, but with a little extra work it can be used to push your release anywhere (npm, dockerhub, quay.io...)

How it works

In order for semantics to work, a particular structure must be adhered to when committing changes to your target repo. By default, the following commit structure will allow for automatic Semantic Versioning off the repo.

  • Commits beginning with major: will increase the release tag by one major version.
    • This will reset both the minor, and patch versions to 0.
    • For instance, v1.4.7 would become v2.0.0
  • Commits beginning with minor: will increase the release tag by one minor version.
    • This will reset the patch version to 0.
    • For instance, v1.4.7 would become v1.5.0
  • Commits beginning with patch: will increase the release tag by one patch version.
    • For instance, v1.4.7 would become v1.4.8

Command Line Arguments

semantics is intended to be adapted to whatever workflow suites you best, so there are a number of arguments to the CLI:

  • --major=<pattern>: use a custom regex pattern to recognize commits that should trigger a major version bump.
  • --minor=<pattern>: use a custom regex pattern to recognize commits that should trigger a minor version bump.
  • --patch=<pattern>: use a custom regex pattern to recognize commits that should trigger a patch version bump.
  • --output-tag: suppress all output except for what the new version will be.
  • --dry-run: skip the step of actually pushing the new tag to GitHub.

FAQ

Q: Do I have to change my git workflow for this to work properly?

A: Yes. But not much!

In order for semantics to work, you need to make sure that any commit that you want to trigger a version bump is properly formatted. For instance, if you want to bump one minor version, you'll need a commit with a message like minor: some stuff I did. Note that not all commits must be formatted like this; you only need to do this when you want to bump version (Merging Pull Requests, for instance)

Additionally, you shouldn't force push to any branch you have set up with semantics. If you force push to a release branch, you are overwriting your history, which is going to completely throw semantics into a tizzy. Nobody wants that.

Q: Can I use semantics to publish releases to NPM?

A: Kinda.

At the moment, semantics only supports sending tags to GitHub automatically. We're working on NPM support, but it isn't ready at the moment.

However, you can still use semantics to help you out with pushing tags to NPM. If you provide the --output-tag and --dry-run arguments, semantics will not push your tags anywhere, but will just print the new tag to stdout. You can use this in a simple script that can then push that tag to NPM.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].