Code Monkey home page Code Monkey logo

release's Introduction

GoDoc Build Status 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

release's People

Contributors

duffn avatar lukasschlueter avatar markbates avatar paganotoni avatar stanislas-m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

release's Issues

Issue caused by this package when installing buffalo

When trying to install buffalo I keep gettings this error: # github.com/gobuffalo/release/genny/release ..\..\go\src\github.com\gobuffalo\release\genny\release\options.go:42:18: cannot use v (type *semver.Version) as type semver.Version in assignment
and it seems to be caused by this package.

"make update" fails if package has "-" in it

version.go:

package runner-ex

// Version of runner
const Version = "0.0.1"

bash:

x-MacBook-Pro:runner-ex apple$ make update
go get -u -tags "sqlite"
# github.com/joeblew99/runner-ex
./version.go:1:15: syntax error: unexpected -, expecting semicolon or newline
make[1]: *** [update] Error 2

Goreleaser GITLAB_TOKEN

Hello,

Since version v0.112.0 of GoReleaser, we can use Gitlab Releaser.

But in gobuffalo/release, we are forced to use the variable GITHUB_TOKEN, if we initialize it with a bad value, goreleaser does not accept GITHUB_TOKEN and GITLAB_TOKEN.

Errors:

  • Error: you must set a GITHUB_TOKEN
  • ⨯ release failed after 3.09s error=both GITHUB_TOKEN and GITLAB_TOKEN. Only one is allowed

Could you disable checking GITHUB_TOKEN ?

Thank you.

gobuffalo/release: v1.8.3
goreleaser: 0.114.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.