Skip to content

Commit 6e4f142

Browse files
Merge pull request #162 from gliderlabs/master
release 0.3.14
2 parents 3032d4c + eec2c5e commit 6e4f142

File tree

9 files changed

+48
-21
lines changed

9 files changed

+48
-21
lines changed

CHANGELOG.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ All notable changes to this project will be documented in this file.
1111
### Changed
1212

1313

14+
## [0.3.14] - 2016-06-27
15+
### Added
16+
- @michaelshobbs implement heroku-like buildpack detect order and output. closes #133
17+
18+
### Fixed
19+
- @michaelshobbs because nodejs matches before ember, manually set the ember buildpack
20+
21+
### Changed
22+
- @michaelshobbs Update go to version v41
23+
- @michaelshobbs Update grails to version v21
24+
- @michaelshobbs Update php to version v107
25+
26+
1427
## [0.3.13] - 2016-05-09
1528
### Fixed
1629
- @michaelshobbs ensure correct permissions on tgz buildpack directories
@@ -212,7 +225,8 @@ All notable changes to this project will be documented in this file.
212225
- User for `buildpack-build` is `$USER` or randomized
213226
- User for `procfile-exec` is `$USER` or detected from `/app`
214227

215-
[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.13...HEAD
228+
[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.14...HEAD
229+
[0.3.14]: https://github.com/gliderlabs/herokuish/compare/v0.3.13...v0.3.14
216230
[0.3.13]: https://github.com/gliderlabs/herokuish/compare/v0.3.12...v0.3.13
217231
[0.3.12]: https://github.com/gliderlabs/herokuish/compare/v0.3.11...v0.3.12
218232
[0.3.11]: https://github.com/gliderlabs/herokuish/compare/v0.3.10...v0.3.11

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM heroku/cedar:14
2-
RUN curl https://github.com/gliderlabs/herokuish/releases/download/v0.3.13/herokuish_0.3.13_linux_x86_64.tgz \
2+
RUN curl https://github.com/gliderlabs/herokuish/releases/download/v0.3.13/herokuish_0.3.14_linux_x86_64.tgz \
33
--silent -L | tar -xzC /bin
44
RUN /bin/herokuish buildpack install \
55
&& ln -s /bin/herokuish /build \

Makefile

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
NAME = herokuish
22
HARDWARE = $(shell uname -m)
3-
VERSION ?= 0.3.13
3+
VERSION ?= 0.3.14
44
IMAGE_NAME ?= $(NAME)
55
BUILD_TAG ?= dev
66

7+
BUILDPACK_ORDER := multi ruby nodejs clojure python java gradle grails scala play php go erlang static emberjs
8+
SHELL := /bin/bash
9+
710
build:
8-
cat buildpacks/*/buildpack* | sed 'N;s/\n/ /' | sort > include/buildpacks.txt
11+
@count=0; \
12+
for i in $(BUILDPACK_ORDER); do \
13+
bp_count=$$(printf '%02d' $$count) ; \
14+
echo -n "$${bp_count}_buildpack-$$i "; \
15+
cat buildpacks/*-$$i/buildpack* | sed 'N;s/\n/ /'; \
16+
count=$$((count + 1)) ; \
17+
done > include/buildpacks.txt
918
go-bindata include
1019
mkdir -p build/linux && GOOS=linux go build -a -ldflags "-X main.Version=$(VERSION)" -o build/linux/$(NAME)
1120
mkdir -p build/darwin && GOOS=darwin go build -a -ldflags "-X main.Version=$(VERSION)" -o build/darwin/$(NAME)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export BUILDPACK_URL=https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v36
1+
v41
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
v21
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v102
1+
v107

buildpacks/test

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ app-test() {
1212

1313
# runs the generic app test
1414
run-test() {
15+
[[ "$TRACE" ]] && set -x
1516
declare app="$1"
1617
local buildpack="buildpack-${1%%-*}"
1718
cd "$(dirname $BASH_SOURCE)"
1819
local app_path="$PWD/$buildpack/tests/$app"
1920
cd - &> /dev/null
2021
[[ "$CI" ]] || rmflag="--rm"
21-
docker run $rmflag -v "$app_path:/tmp/app" herokuish:dev /bin/herokuish test / "$app"
22+
[[ "$TRACE" ]] && debug_flag="-e TRACE=true"
23+
docker run $rmflag $debug_flag -v "$app_path:/tmp/app" herokuish:dev /bin/herokuish test / "$app"
2224
}
2325

2426
main() {

include/buildpack.bash

+14-13
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ buildpack-install() {
1313
declare url="$1" commit="$2" name="$3"
1414
ensure-paths
1515
if [[ ! "$url" ]]; then
16-
asset-cat include/buildpacks.txt | while read url commit; do
17-
buildpack-install "$url" "$commit"
16+
asset-cat include/buildpacks.txt | while read name url commit; do
17+
buildpack-install "$url" "$commit" "$name"
1818
done
1919
return
2020
fi
@@ -109,18 +109,19 @@ buildpack-execute() {
109109

110110
selected_name="$(unprivileged $selected_path/bin/detect $build_path || true)"
111111
else
112-
# force heroku-buildpack-multi to detect first if exists
113-
if ls "$buildpack_path/heroku-buildpack-multi" > /dev/null 2>&1; then
114-
selected_name="$(unprivileged $buildpack_path/heroku-buildpack-multi/bin/detect $build_path)" \
115-
&& selected_path="$buildpack_path/heroku-buildpack-multi"
112+
local buildpacks=($buildpack_path/*)
113+
local valid_buildpacks=()
114+
for buildpack in "${buildpacks[@]}"; do
115+
unprivileged $buildpack/bin/detect $build_path &> /dev/null \
116+
&& valid_buildpacks+=("$buildpack")
117+
done
118+
if [[ ${#valid_buildpacks[@]} -gt 1 ]]; then
119+
title "Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used."
120+
echo "Detected buildpacks: $(sed -e "s:/tmp/buildpacks/[0-9][0-9]_buildpack-::g" <<< "${valid_buildpacks[@]}")" | indent
116121
fi
117-
if [[ ! "$selected_path" ]]; then
118-
local buildpacks=($buildpack_path/*)
119-
for buildpack in "${buildpacks[@]}"; do
120-
selected_name="$(unprivileged $buildpack/bin/detect $build_path)" \
121-
&& selected_path="$buildpack" \
122-
&& break
123-
done
122+
if [[ ${#valid_buildpacks[@]} -gt 0 ]]; then
123+
selected_path="${valid_buildpacks[0]}"
124+
selected_name=$(unprivileged $selected_path/bin/detect $build_path)
124125
fi
125126
fi
126127
if [[ "$selected_path" ]] && [[ "$selected_name" ]]; then

0 commit comments

Comments
 (0)