<commit_before># anvil

Alternate Heroku push/deploy workflow.

## Installation

    $ heroku plugins:install https://github.com/ddollar/heroku-anvil

## Usage

#### Create a slug

    $ heroku build
    Generating app manifest... done
    Uploading new files... done, 0 files needed
    Launching build process... done
    Recreating app from manifest... done
    Fetching buildpack... done
    Detecting buildpack... done, Buildkit+Node.js
    Compiling app...
      Compiling for Node.js
      ...
    Creating slug... done
    Uploading slug... done
    Success, slug is https://anvil.herokuapp.com/slugs/00000000-0000-0000-0000-000000000000.img

#### Create a slug and release it

    $ heroku build -r
    Generating app manifest... done
    Uploading new files... done, 0 files needed
    Launching build process... done
    Recreating app from manifest... done
    Fetching buildpack... done
    Detecting buildpack... done, Buildkit+Node.js
    Compiling app...
      Compiling for Node.js
      ...
    Creating slug... done
    Uploading slug... done
    Success, slug is https://anvil.herokuapp.com/slugs/00000000-0000-0000-0000-000000000000.img
    Downloading slug... done
    Releasing to anvil... done, v158

#### Release an existing slug

    $ heroku release https://anvil.herokuapp.com/slugs/00000000-0000-0000-0000-000000000000.img
    Downloading slug... done
    Releasing to anvil... done, v158

## Advanced Usage

#### Build

    Usage: heroku build [DIR]

     deploy code

     -b, --buildpack URL  # use a custom buildpack
     -e, --runtime-env    # use runtime environment during build
     -r, --release        # release the slug to an app

#### Release

    Usage: heroku release SLUG_URL

      release a slug

## API

Applications are described by a manifest, in JSON format:

    {
      "README.md": {
        "ctime": 1339185087,
        "mtime": 1339185087,
        "mode":  100644,
        "hash":  "0000000000000000000000000000000000000000000000000000000000000000"
      },
      "lib/web.rb": {
        "ctime": 1339185087,
        "mtime": 1339185087,
        "mode":  100644,
        "hash":  "0000000000000000000000000000000000000000000000000000000000000000"
      }

### POST /manifest
##### Store a manifest

###### Options
* `manifest`: an application manifest as json

###### Example
    $ curl -X POST https://anvil.herokuapp.com/manifest \
           -d "manifest=$(cat manifest.json)"
    {"id":"00000000-0000-0000-0000-000000000000"}

### POST /manifest/build
##### Build a manifest

###### Options
* `manifest`: an application manifest as json
* `buildpack`: a buildpack url (optional)
* `env`: a hash of environment variables to use during build

###### Example<commit_msg>Update master<commit_after># anvil

Alternate Heroku push/deploy workflow.

## Installation

    $ heroku plugins:install https://github.com/ddollar/heroku-anvil

## Usage

#### Create a slug

    $ heroku build
    Generating app manifest... done
    Uploading new files... done, 0 files needed
    Launching build process... done
    Recreating app from manifest... done
    Fetching buildpack... done
    Detecting buildpack... done, Buildkit+Node.js
    Compiling app...
      Compiling for Node.js
      ...
    Creating slug... done
    Uploading slug... done
    Success, slug is https://anvil.herokuapp.com/slugs/00000000-0000-0000-0000-000000000000.img

#### Create a slug and release it

    $ heroku build -r
    Generating app manifest... done
    Uploading new files... done, 0 files needed
    Launching build process... done
    Recreating app from manifest... done
    Fetching buildpack... done
    Detecting buildpack... done, Buildkit+Node.js
    Compiling app...
      Compiling for Node.js
      ...
    Creating slug... done
    Uploading slug... done
    Success, slug is https://anvil.herokuapp.com/slugs/00000000-0000-0000-0000-000000000000.img
    Downloading slug... done
    Releasing to anvil... done, v158

#### Release an existing slug

    $ heroku release https://anvil.herokuapp.com/slugs/00000000-0000-0000-0000-000000000000.img
    Downloading slug... done
    Releasing to anvil... done, v158

## Advanced Usage

#### Build

    Usage: heroku build [DIR]

     deploy code

     -b, --buildpack URL  # use a custom buildpack
     -e, --runtime-env    # use runtime environment during build
     -r, --release        # release the slug to an app

#### Release

    Usage: heroku release SLUG_URL

      release a slug

## API

Applications are described by a manifest, in JSON format:

    {
      "README.md": {
        "ctime": 1339185087,
        "mtime": 1339185087,
        "mode":  100644,
        "hash":  "0000000000000000000000000000000000000000000000000000000000000000"
      },
      "lib/web.rb": {
        "ctime": 1339185087,
        "mtime": 1339185087,
        "mode":  100644,
        "hash":  "0000000000000000000000000000000000000000000000000000000000000000"
      }
    }

### POST /manifest
##### Store a manifest

###### Options
* `manifest`: an application manifest as json

###### Example
    $ curl -X POST https://anvil.herokuapp.com/manifest \
           -d "manifest=$(cat manifest.json)"
    {"id":"00000000-0000-0000-0000-000000000000"}

### POST /manifest/build
##### Build a manifest

###### Options
* `manifest`: an application manifest as json
* `buildpack`: a buildpack url (optional)
* `env`: a hash of environment variables to use during build

###### Example
{'fraction_non_alphanumeric': 0.12074019787467936, 'fraction_numerical': 0.11579333089043606, 'mean_word_length': 2.603300330033003, 'pattern_counts': {'":': 22, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 20, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '841643', 'n_tokens_mistral': 2183, 'n_tokens_neox': 1530, 'n_words': 496}