Skip to content

Commit

Permalink
Updating github-config
Browse files Browse the repository at this point in the history
  • Loading branch information
cf-buildpacks-eng committed Jun 30, 2021
1 parent a717f30 commit 8f02384
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions scripts/.util/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,47 @@ function util::tools::jq::install() {
chmod +x "${dir}/jq"
fi
}

function util::tools::cf::install() {
local dir
while [[ "${#}" != 0 ]]; do
case "${1}" in
--directory)
dir="${2}"
shift 2
;;

*)
util::print::error "unknown argument \"${1}\""
esac
done

mkdir -p "${dir}"
util::tools::path::export "${dir}"

local os
case "$(uname)" in
"Darwin")
os="macosx64"
;;

"Linux")
os="linux64"
;;

*)
echo "Unknown OS \"$(uname)\""
exit 1
esac

if [[ ! -f "${dir}/cf" ]]; then
util::print::title "Installing cf"

curl "https://packages.cloudfoundry.org/stable?release=${os}-binary&version=6.49.0&source=github-rel" \
--silent \
--location \
--output /tmp/cf.tar.gz
tar -xzf /tmp/cf.tar.gz -C "${dir}" cf
rm /tmp/cf.tar.gz
fi
}
1 change: 1 addition & 0 deletions scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function main() {

util::tools::ginkgo::install --directory "${ROOTDIR}/.bin"
util::tools::buildpack-packager::install --directory "${ROOTDIR}/.bin"
util::tools::cf::install --directory "${ROOTDIR}/.bin"

local stack
stack="$(jq -r -S .stack "${ROOTDIR}/config.json")"
Expand Down

0 comments on commit 8f02384

Please sign in to comment.