Skip to content

Commit

Permalink
Updating github-config
Browse files Browse the repository at this point in the history
  • Loading branch information
paketo-bot committed Sep 30, 2023
1 parent a0abfe0 commit 728d5bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/.util/tools.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"jam": "v2.5.0",
"jam": "v2.6.0",
"pack": "v0.31.0"
}
23 changes: 18 additions & 5 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source "${ROOT_DIR}/scripts/.util/tools.sh"
source "${ROOT_DIR}/scripts/.util/print.sh"

function main {
local version output token
local version output token flags
token=""

while [[ "${#}" != 0 ]]; do
Expand All @@ -35,6 +35,11 @@ function main {
shift 2
;;

--label)
flags+=("--label" "${2}")
shift 2
;;

--help|-h)
shift 1
usage
Expand Down Expand Up @@ -66,7 +71,7 @@ function main {
tools::install "${token}"

buildpack::archive "${version}"
buildpackage::create "${output}"
buildpackage::create "${output}" "${flags[@]}"
}

function usage() {
Expand Down Expand Up @@ -121,15 +126,23 @@ function buildpack::archive() {
}

function buildpackage::create() {
local output
local output flags
output="${1}"
flags=("${@:2}")

util::print::title "Packaging buildpack..."

args=(
--config "${ROOT_DIR}/package.toml"
--format file
)


args+=("${flags[@]}")

pack \
buildpack package "${output}" \
--config "${ROOT_DIR}/package.toml" \
--format file
"${args[@]}"
}

main "${@:-}"

0 comments on commit 728d5bd

Please sign in to comment.