├── bin ├── release ├── detect └── compile └── README.md /bin/release: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "--- {}" -------------------------------------------------------------------------------- /bin/detect: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f $1/.vendor_urls ]; then 4 | echo "VendorBinaries" 5 | exit 0 6 | else 7 | exit 1 8 | fi -------------------------------------------------------------------------------- /bin/compile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | indent() { 5 | sed -u 's/^/ /' 6 | } 7 | 8 | echo "-----> Found a .vendor_urls file" 9 | 10 | # Bail early but noisily 11 | if [ ! -s $1/.vendor_urls ]; then 12 | echo ".vendor_urls empty. Skipping." | indent 13 | exit 0 14 | fi 15 | 16 | cd $1 17 | 18 | while read url; do 19 | if [ -n "$url" ]; then # incase ensure_newline_at_eof_on_save is enabled 20 | echo Vendoring $url | indent 21 | curl -L --silent $url | tar xz 22 | fi 23 | done < .vendor_urls 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Heroku buildpack: Vendor Binaries 2 | ================================= 3 | 4 | This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for vendoring binaries into your project. It doesn't do anything else, so to actually compile your app you should use [heroku-buildpack-multi](https://github.com/ddollar/heroku-buildpack-multi) to combine it with a real buildpack. 5 | 6 | Usage 7 | ----- 8 | 9 | $ ls 10 | .vendor_urls 11 | .buildpacks 12 | 13 | $ heroku create --stack cedar --buildpack http://github.com/dollar/heroku-buildpack-multi.git 14 | 15 | $ git push heroku master 16 | ... 17 | -----> Heroku receiving push 18 | -----> Fetching custom buildpack 19 | -----> Found a .vendor_urls file 20 | Vendoring https://s3.amazonaws.com/my-bucket/foo.tar.gz 21 | ... 22 | 23 | The buildpack will detect that your app has a `.vendor_urls` file in the root. Each line in this file will be treated as a URL pointing at a tarball to fetch and extract into your application's root directory. 24 | 25 | --------------------------------------------------------------------------------