diff --git a/CHANGELOG.md b/CHANGELOG.md index b6b735392..9372b2fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,19 @@ All notable changes to this project will be documented in this file. ### Changed +## [0.3.14] - 2016-06-27 +### Added +- @michaelshobbs implement heroku-like buildpack detect order and output. closes #133 + +### Fixed +- @michaelshobbs because nodejs matches before ember, manually set the ember buildpack + +### Changed +- @michaelshobbs Update go to version v41 +- @michaelshobbs Update grails to version v21 +- @michaelshobbs Update php to version v107 + + ## [0.3.13] - 2016-05-09 ### Fixed - @michaelshobbs ensure correct permissions on tgz buildpack directories @@ -212,7 +225,8 @@ All notable changes to this project will be documented in this file. - User for `buildpack-build` is `$USER` or randomized - User for `procfile-exec` is `$USER` or detected from `/app` -[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.13...HEAD +[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.14...HEAD +[0.3.14]: https://github.com/gliderlabs/herokuish/compare/v0.3.13...v0.3.14 [0.3.13]: https://github.com/gliderlabs/herokuish/compare/v0.3.12...v0.3.13 [0.3.12]: https://github.com/gliderlabs/herokuish/compare/v0.3.11...v0.3.12 [0.3.11]: https://github.com/gliderlabs/herokuish/compare/v0.3.10...v0.3.11 diff --git a/Dockerfile b/Dockerfile index a10f0f699..1ee8c3ff0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM heroku/cedar:14 -RUN curl https://github.com/gliderlabs/herokuish/releases/download/v0.3.13/herokuish_0.3.13_linux_x86_64.tgz \ +RUN curl https://github.com/gliderlabs/herokuish/releases/download/v0.3.13/herokuish_0.3.14_linux_x86_64.tgz \ --silent -L | tar -xzC /bin RUN /bin/herokuish buildpack install \ && ln -s /bin/herokuish /build \ diff --git a/Makefile b/Makefile index b8968d6ba..a332e6d7a 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,20 @@ NAME = herokuish HARDWARE = $(shell uname -m) -VERSION ?= 0.3.13 +VERSION ?= 0.3.14 IMAGE_NAME ?= $(NAME) BUILD_TAG ?= dev +BUILDPACK_ORDER := multi ruby nodejs clojure python java gradle grails scala play php go erlang static emberjs +SHELL := /bin/bash + build: - cat buildpacks/*/buildpack* | sed 'N;s/\n/ /' | sort > include/buildpacks.txt + @count=0; \ + for i in $(BUILDPACK_ORDER); do \ + bp_count=$$(printf '%02d' $$count) ; \ + echo -n "$${bp_count}_buildpack-$$i "; \ + cat buildpacks/*-$$i/buildpack* | sed 'N;s/\n/ /'; \ + count=$$((count + 1)) ; \ + done > include/buildpacks.txt go-bindata include mkdir -p build/linux && GOOS=linux go build -a -ldflags "-X main.Version=$(VERSION)" -o build/linux/$(NAME) mkdir -p build/darwin && GOOS=darwin go build -a -ldflags "-X main.Version=$(VERSION)" -o build/darwin/$(NAME) diff --git a/buildpacks/buildpack-emberjs/tests/emberjs/.env b/buildpacks/buildpack-emberjs/tests/emberjs/.env new file mode 100644 index 000000000..9c5305d2e --- /dev/null +++ b/buildpacks/buildpack-emberjs/tests/emberjs/.env @@ -0,0 +1 @@ +export BUILDPACK_URL=https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz diff --git a/buildpacks/buildpack-go/buildpack-version b/buildpacks/buildpack-go/buildpack-version index c5d5851e1..cbfdb99da 100644 --- a/buildpacks/buildpack-go/buildpack-version +++ b/buildpacks/buildpack-go/buildpack-version @@ -1 +1 @@ -v36 +v41 diff --git a/buildpacks/buildpack-grails/buildpack-version b/buildpacks/buildpack-grails/buildpack-version index 9a2a0e219..168943762 100644 --- a/buildpacks/buildpack-grails/buildpack-version +++ b/buildpacks/buildpack-grails/buildpack-version @@ -1 +1 @@ -v20 +v21 diff --git a/buildpacks/buildpack-php/buildpack-version b/buildpacks/buildpack-php/buildpack-version index 164c9875a..84413bdc1 100644 --- a/buildpacks/buildpack-php/buildpack-version +++ b/buildpacks/buildpack-php/buildpack-version @@ -1 +1 @@ -v102 +v107 diff --git a/buildpacks/test b/buildpacks/test index fa8840aff..d31d8bd98 100755 --- a/buildpacks/test +++ b/buildpacks/test @@ -12,13 +12,15 @@ app-test() { # runs the generic app test run-test() { + [[ "$TRACE" ]] && set -x declare app="$1" local buildpack="buildpack-${1%%-*}" cd "$(dirname $BASH_SOURCE)" local app_path="$PWD/$buildpack/tests/$app" cd - &> /dev/null [[ "$CI" ]] || rmflag="--rm" - docker run $rmflag -v "$app_path:/tmp/app" herokuish:dev /bin/herokuish test / "$app" + [[ "$TRACE" ]] && debug_flag="-e TRACE=true" + docker run $rmflag $debug_flag -v "$app_path:/tmp/app" herokuish:dev /bin/herokuish test / "$app" } main() { diff --git a/include/buildpack.bash b/include/buildpack.bash index 6a1b5b2b0..eb484712b 100644 --- a/include/buildpack.bash +++ b/include/buildpack.bash @@ -13,8 +13,8 @@ buildpack-install() { declare url="$1" commit="$2" name="$3" ensure-paths if [[ ! "$url" ]]; then - asset-cat include/buildpacks.txt | while read url commit; do - buildpack-install "$url" "$commit" + asset-cat include/buildpacks.txt | while read name url commit; do + buildpack-install "$url" "$commit" "$name" done return fi @@ -109,18 +109,19 @@ buildpack-execute() { selected_name="$(unprivileged $selected_path/bin/detect $build_path || true)" else - # force heroku-buildpack-multi to detect first if exists - if ls "$buildpack_path/heroku-buildpack-multi" > /dev/null 2>&1; then - selected_name="$(unprivileged $buildpack_path/heroku-buildpack-multi/bin/detect $build_path)" \ - && selected_path="$buildpack_path/heroku-buildpack-multi" + local buildpacks=($buildpack_path/*) + local valid_buildpacks=() + for buildpack in "${buildpacks[@]}"; do + unprivileged $buildpack/bin/detect $build_path &> /dev/null \ + && valid_buildpacks+=("$buildpack") + done + if [[ ${#valid_buildpacks[@]} -gt 1 ]]; then + title "Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used." + echo "Detected buildpacks: $(sed -e "s:/tmp/buildpacks/[0-9][0-9]_buildpack-::g" <<< "${valid_buildpacks[@]}")" | indent fi - if [[ ! "$selected_path" ]]; then - local buildpacks=($buildpack_path/*) - for buildpack in "${buildpacks[@]}"; do - selected_name="$(unprivileged $buildpack/bin/detect $build_path)" \ - && selected_path="$buildpack" \ - && break - done + if [[ ${#valid_buildpacks[@]} -gt 0 ]]; then + selected_path="${valid_buildpacks[0]}" + selected_name=$(unprivileged $selected_path/bin/detect $build_path) fi fi if [[ "$selected_path" ]] && [[ "$selected_name" ]]; then