This repository has been archived by the owner on Sep 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae2ea58
commit ef26767
Showing
3 changed files
with
93 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
set -o pipefail | ||
|
||
# shellcheck source=SCRIPTDIR/print.sh | ||
source "$(dirname "${BASH_SOURCE[0]}")/print.sh" | ||
|
||
function util::builders::list() { | ||
local integrationJSON="${1}" | ||
local builders="" | ||
if [[ -f "${integrationJSON}" ]]; then | ||
builders="$(jq --compact-output 'select(.builder != null) | [.builder]' "${integrationJSON}")" | ||
|
||
if [[ -z "${builders}" ]]; then | ||
builders="$(jq --compact-output 'select(.builders != null) | .builders' "${integrationJSON}")" | ||
fi | ||
fi | ||
|
||
if [[ -z "${builders}" ]]; then | ||
util::print::info "No builders specified. Falling back to default builder..." | ||
builders="$(jq --compact-output --null-input '["index.docker.io/paketobuildpacks/builder:buildpackless-base"]')" | ||
fi | ||
|
||
echo "${builders}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters