forked from teamhephy/slugbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-buildpacks
More file actions
executable file
·42 lines (35 loc) · 2 KB
/
install-buildpacks
File metadata and controls
executable file
·42 lines (35 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
set -eo pipefail
BUILDPACK_INSTALL_PATH="/tmp/buildpacks"
download_buildpack() {
buildpack_url="$1"
buildpack_commit="$2"
buildpack_name="$3"
echo "Fetching $buildpack_name..."
set +e
git clone --branch "$buildpack_commit" --depth 1 "$buildpack_url" $BUILDPACK_INSTALL_PATH/"$buildpack_name" &>/dev/null
SHALLOW_CLONED=$?
set -e
if [ $SHALLOW_CLONED -ne 0 ]; then
# if the shallow clone failed partway through, clean up and try a full clone
rm -rf "${BUILDPACK_INSTALL_PATH:?}"/"$buildpack_name"
git clone --quiet "$buildpack_url" $BUILDPACK_INSTALL_PATH/"$buildpack_name"
pushd $BUILDPACK_INSTALL_PATH/"$buildpack_name" &>/dev/null
git checkout --quiet "$buildpack_commit"
popd &>/dev/null
fi
echo "Done."
}
mkdir -p $BUILDPACK_INSTALL_PATH
download_buildpack https://github.com/heroku/heroku-buildpack-multi.git v1.0.0 01-multi
download_buildpack https://github.com/heroku/heroku-buildpack-clojure.git v86 02-clojure
download_buildpack https://github.com/heroku/heroku-buildpack-go.git v149 03-go
download_buildpack https://github.com/heroku/heroku-buildpack-gradle.git v33 04-gradle
download_buildpack https://github.com/heroku/heroku-buildpack-grails.git v21 05-grails
download_buildpack https://github.com/heroku/heroku-buildpack-java.git v68 06-java
download_buildpack https://github.com/heroku/heroku-buildpack-nodejs.git v181 07-nodejs
download_buildpack https://github.com/heroku/heroku-buildpack-php.git v187 08-php
download_buildpack https://github.com/heroku/heroku-buildpack-play.git v26 09-play
download_buildpack https://github.com/heroku/heroku-buildpack-python.git v187 10-python
download_buildpack https://github.com/heroku/heroku-buildpack-ruby.git v222 11-ruby
download_buildpack https://github.com/heroku/heroku-buildpack-scala.git v88 12-scala