Skip to content
Buffalo ecosystem release tool
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd azure pipelines (#7) Feb 24, 2019
genny version bump: v1.3.2 Apr 14, 2019
packrd version bump: v1.3.2 Apr 14, 2019
release
.gitignore ignore Sep 4, 2018
.goreleaser.yml
LICENSE initial commit Sep 4, 2018
Makefile
README.md packr2 Nov 28, 2018
SHOULDERS.md version bump: v1.3.2 Apr 14, 2019
azure-pipelines.yml version bump: v1.2.5 Feb 28, 2019
azure-tests.yml azure pipelines (#7) Feb 24, 2019
go.mod
go.sum version bump: v1.3.2 Apr 14, 2019
main.go initial commit Sep 4, 2018

README.md

GoDoc Go Report Card

github.com/gobuffalo/release

This tool is/will be used to release new tools from the Buffalo eco-system. (Although it should work for everyone.)


Installation

$ go get -u -v github.com/gobuffalo/release

Setting up Your Project

Release is designed to work with any Go project using GitHub.com as it's VCS (Pull Requests welcome), so there isn't any setup needed.

Should you want to make your "releasing" experience a little easier, then the release init command is for you.

$ release init -h

setups a project to use release

Usage:
  release init [flags]

Flags:
  -d, --dry-run               runs the generator dry
  -f, --force                 force files to overwrite existing ones
  -h, --help                  help for init
  -m, --main-file string      adds a .goreleaser.yml file (only for binary applications)
  -v, --version-file string   path to a version file to maintain (default "version.go")

Flags

-m - (Binary Applications Only)

If you pass -m path/to/main.go then Release will generate a .goreleaser.yml file for you.

-v - Version File

Release will automatically manage a "version" file for you. If you have an existing version file the -v allows Release to automatically update that file for you when you run the make release task.

If don't pass a -v flag then Release will create a new file for you, ./version.go.

package mypackage

const Version = "v1.0.0"

Releasing

The basics of what this command does are the following:

  • Confirm semver version and branch
  • (write version file)
  • Generate shoulders.md file
  • Run packr2 to pack any boxes
  • (make install)
  • (make release-test)
  • (commit version bump)
  • tag release
  • (run goreleaser)

The items inside of () are only run if needed for that project.

$ release -h

Usage:
  release [flags]
  release [command]

Available Commands:
  doctor      checks to make sure your system is ready to release
  help        Help about any command
  init        setups a project to use release
  version     current version of release

Flags:
  -b, --branch string         branch you want to use (default is current branch) (default "master")
  -d, --dry-run               runs the release without actually releasing
  -h, --help                  help for release
  -v, --version string        version you want to release
  -f, --version-file string   write the version back into your version file (default "version.go")
  -y, --yes                   yes to all prompts

Use "release [command] --help" for more information about a command.

Flags

-v - Version Flag

If a -v v1.0.0 flag is passed then the version from that flag will be used. If no -v flag is used, then a prompt will be presented to the user, displaying up to the last file release tags (for context), and the user can enter a tag at the prompt.

$ release

v2.0.11
v2.0.10
v2.0.9
v2.0.8
v2.0.7
Enter version number (vx.x.x):

-f - Version File

Release will automatically manage a "version" file for you. If you have an existing version file the -f allows Release to automatically update that file for you when releasing.

If don't pass a -f flag then Release will create a new file for you, ./version.go.

package mypackage

const Version = "v1.0.0"

Doctor

The Doctor is in! Run this inside of the project you want to release before releasing it! It will save you time later on by making sure your system is ready release this particular project.

$ release doctor
You can’t perform that action at this time.