build and release tool for golang applications
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
VERSION
bake.go
util.go
version.go

README.md

bake

build and release tool for golang applications

bake is a simple, minimal build, release and versioning tool that combines the go tool, git and google drive api. It aims to make it easier to release and maintain golang applications

What does it do?

Once installed and configured, bake will

  • maintain the current version of your app in a version file (default ./VERSION)
  • will either create a version file, if it doesn't exist, with the intial version 0.1.0
  • or increment version to the next build/minor/major version
  • build your binary (wraps aroung go build) and pass in the new version
  • built binaries are placed by default at .dist/$binary-$version-$platform-$arch
  • commit the new version file to git
  • add a git tag for the new version e.g (v0.1.1)
  • if there are no additional uncommitted changes, git push to remote
  • if configured, upload the build binary to google drive.

Apart from build, all other steps can be enabled/disabled by flags.

Downloads

Installation

Either download the latest pre compiled binary for your platform, from the links above.

OR

Build it yourself

go get github.com/singhsaysdotcom/bake

(you need golang installed and GOPATH configured for this to work)

Configuration

There is no required configuration to get started. There is optional configuration to use some features.

Uploading to Google Drive

bake uses the gdrive app from http://github.com/prasmussen/gdrive for Google Drive integration. You need to generate an oauth token for the google drive api, as a one time step. Currently, you need to install the gdrive app to do that

go install github.com/prasmussen/gdrive
$GOPATH/bin/gdrive

Follow the interactive prompt to generate and save the oauth token.

Usage

You need an existing existing git repo containing your source code, to start using bake

Start managing an unversioned app with bake

bake next

Build with bake

bake next

to build at the next build number

bake minor

to build the next minor version

bake major

to build the next major version

bake rebuild

to build at the current version

bake reupload

to build at the current version and upload the built binary to google drive.

TODO/Things that could be better

  • add unit tests
  • add a dry run mode and make that the default
  • consider switching to a native git library instead of forking shell commands
    • not libgit2, because avoid shared lib dependencies
  • add a go get step before builds
  • add a subcommand to configure google drive api oauth token
  • make the upload task modular
  • add other upload providers (e.g. dropbox, http upload, sftp upload etc)

Contributions/Pull Requests are welcome.