Skip to content

Commit 262b587

Browse files
committed
Merge pull request #67 from gliderlabs/master
release 0.3.3
2 parents 08728e5 + 8fbc12b commit 262b587

File tree

8 files changed

+64
-9
lines changed

8 files changed

+64
-9
lines changed

CHANGELOG.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ All notable changes to this project will be documented in this file.
1010

1111
### Changed
1212

13+
## [0.3.3] - 2015-09-10
14+
### Added
15+
- Use exec to run procfile entries
16+
- Throw error when detect fails in custom buildpack
17+
18+
### Changed
19+
- Bumped scala buildpack to v60
20+
21+
1322
## [0.3.2] - 2015-07-28
1423
### Added
1524
- Repo Analytics to README
@@ -84,7 +93,8 @@ All notable changes to this project will be documented in this file.
8493
- User for `buildpack-build` is `$USER` or randomized
8594
- User for `procfile-exec` is `$USER` or detected from `/app`
8695

87-
[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.2...HEAD
96+
[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.3...HEAD
97+
[0.3.3]: https://github.com/gliderlabs/herokuish/compare/v0.3.2...v0.3.3
8898
[0.3.2]: https://github.com/gliderlabs/herokuish/compare/v0.3.1...v0.3.2
8999
[0.3.1]: https://github.com/gliderlabs/herokuish/compare/v0.3.0...v0.3.1
90100
[0.3.0]: https://github.com/gliderlabs/herokuish/compare/v0.2.0...v0.3.0

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.2/herokuish_0.3.2_linux_x86_64.tgz \
2+
RUN curl https://github.com/gliderlabs/herokuish/releases/download/v0.3.3/herokuish_0.3.3_linux_x86_64.tgz \
33
--silent -L | tar -xzC /bin
44
RUN /bin/herokuish buildpack install \
55
&& ln -s /bin/herokuish /build \

Makefile

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

@@ -23,6 +23,11 @@ build-in-docker:
2323
$(NAME)-build make -e deps build
2424
docker rmi $(NAME)-build || true
2525

26+
clean:
27+
rm -rf build/*
28+
docker rm $(shell docker ps -aq) || true
29+
docker rmi herokuish:dev || true
30+
2631
deps:
2732
docker pull heroku/cedar:14
2833
go get -u github.com/jteeuwen/go-bindata/...

README.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,41 @@ Mounting your local app source directory to `/tmp/app` and running `/bin/herokui
137137
-----> Compiling Ruby/Rack
138138
-----> Using Ruby version: ruby-1.9.3
139139
...
140-
140+
141141
```
142142

143143
You can use this output when you submit issues.
144144

145+
#### Troubleshooting
146+
147+
If you run into an issue and looking for more insight into what `herokuish` is doing, you can set the `$TRACE` environment variable.
148+
149+
```
150+
$ docker run --rm -e TRACE=true -v /abs/app/path:/tmp/app gliderlabs/herokuish /bin/herokuish test
151+
+ [[ -d /tmp/app ]]
152+
+ rm -rf /app
153+
+ cp -r /tmp/app /app
154+
+ cmd-export paths
155+
+ declare 'desc=Exports a function as a command'
156+
+ declare fn=paths as=paths
157+
+ local ns=
158+
++ cmd-list-ns
159+
++ sort
160+
++ grep -v :
161+
++ for k in '"${!CMDS[@]}"'
162+
++ echo :help
163+
...
164+
++ unprivileged /tmp/buildpacks/custom/bin/detect /tmp/build
165+
++ setuidgid u33467 /tmp/buildpacks/custom/bin/detect /tmp/build
166+
++ true
167+
+ selected_name=
168+
+ [[ -n /tmp/buildpacks/custom ]]
169+
+ [[ -n '' ]]
170+
+ title 'Unable to select a buildpack'
171+
----->' Unable to select a buildpack
172+
+ exit 1
173+
```
174+
145175
## Contributing
146176

147177
Pull requests are welcome! Herokuish is written in Bash and Go. Please conform to the [Bash styleguide](https://github.com/progrium/bashstyle) used for this project when writing Bash.

buildpacks/buildpack-nodejs/tests/nodejs-express/server.js

+10
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,14 @@ app.get('/', function(req, res){
99
var port = process.env.PORT || 5000;
1010
server = app.listen(port);
1111

12+
process.on( "SIGINT", function() {
13+
console.log('CLOSING [SIGINT]');
14+
process.exit();
15+
} );
16+
17+
process.on( "SIGTERM", function() {
18+
console.log('CLOSING [SIGTERM]');
19+
process.exit();
20+
} );
21+
1222
console.log('Server listening on port %d in %s mode', server.address().port, app.settings.env);
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v58
1+
v60

include/buildpack.bash

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ buildpack-execute() {
7676

7777
IFS='#' read url commit <<< "$BUILDPACK_URL"
7878
buildpack-install "$url" "$commit" custom &> /dev/null
79-
79+
8080
chown -R "$unprivileged_user:$unprivileged_group" "$buildpack_path/custom"
8181

82-
selected_name="$(unprivileged $selected_path/bin/detect $build_path)"
82+
selected_name="$(unprivileged $selected_path/bin/detect $build_path || true)"
8383
else
8484
# force heroku-buildpack-multi to detect first if exists
8585
if ls "$buildpack_path/heroku-buildpack-multi" > /dev/null 2>&1; then
@@ -95,7 +95,7 @@ buildpack-execute() {
9595
done
9696
fi
9797
fi
98-
if [[ "$selected_path" ]]; then
98+
if [[ "$selected_path" ]] && [[ "$selected_name" ]]; then
9999
title "$selected_name app detected"
100100
else
101101
title "Unable to select a buildpack"

include/procfile.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ procfile-exec() {
1818
procfile-load-env
1919
procfile-load-profile
2020
cd "$app_path"
21-
unprivileged /bin/bash -c "$(eval echo $@)"
21+
exec setuidgid "$unprivileged_user" $(eval echo $@)
2222
}
2323

2424
procfile-types() {

0 commit comments

Comments
 (0)