Skip to content

Commit

Permalink
Merge pull request #77 from cloudfoundry/automation/github-config/update
Browse files Browse the repository at this point in the history
Updates github-config
  • Loading branch information
ryanmoran committed Jul 1, 2021
2 parents a717f30 + 15bbf05 commit 788ec73
Show file tree
Hide file tree
Showing 3 changed files with 46 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/brats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function main() {
util::tools::ginkgo::install --directory "${ROOTDIR}/.bin"
util::tools::buildpack-packager::install --directory "${ROOTDIR}/.bin"
util::tools::jq::install --directory "${ROOTDIR}/.bin"
util::tools::cf::install --directory "${ROOTDIR}/.bin"

local stack
stack="$(jq -r -S .stack "${ROOTDIR}/config.json")"
Expand Down
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 788ec73

Please sign in to comment.