Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: afa111c9bc
Fetching contributors…

Cannot retrieve contributors at this time

83 lines (50 sloc) 2.337 kb


Alternate Heroku build process.


$ heroku plugins:install


Compile an application from a local directory and release it to Heroku

$ heroku build -r myapp
Building ...
Success, slug is
Releasing to done, v42

Release a slug to another app

$ heroku release -a myapp-staging
Releasing to done, v42

Alternatively, you can build from a public-accessible git repository

$ heroku build

You can also specify a buildpack

# specify a buildpack url
$ heroku build -b

# specify a buildpack from
$ heroku build -b heroku/nodejs

Use the pipelining feature to build complex deploy workflows

#!/usr/bin/env bash

# fail fast
set -o errexit
set -o pipefail

# compile a slug of the app
slug=$(heroku build -p)

# release the slug to staging
heroku release $slug -a myapp-staging

# run tests using `heroku run`
heroku run bin/tests -a myapp-staging

# test that the app responds via http

# release to production
heroku release $slug -a myapp-production

Advanced Usage

heroku build

Usage: heroku build [SOURCE]

 build software on an anvil build server

 if SOURCE is a local directory, the contents of the directory will be built
 if SOURCE is a git URL, the contents of the repo will be built
 if SOURCE is a tarball URL, the contents of the tarball will be built

 SOURCE will default to "."

 -b, --buildpack URL  # use a custom buildpack
 -p, --pipeline       # pipe compile output to stderr and only put the slug url on stdout
 -r, --release        # release the slug to an app

heroku release

Usage: heroku release SLUG_URL

 release a slug

 -p, --procfile PROCFILE  # use an alternate Procfile to define process types
Jump to Line
Something went wrong with that request. Please try again.