Skip to content

Commit

Permalink
refactor implementation package script.
Browse files Browse the repository at this point in the history
  • Loading branch information
robdimsdale authored and pacostas committed Jun 17, 2024
1 parent eb0e618 commit 073f2a3
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions implementation/scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,17 @@ function buildpackage::create() {
util::print::title "Packaging ${buildpack_type}... ${output}"

if [ "$buildpack_type" == "extension" ]; then
cwd=$(pwd)
cd ${BUILD_DIR}
mkdir cnbdir
cd cnbdir
cp ../buildpack.tgz .
tar -xvf buildpack.tgz
rm buildpack.tgz
mkdir -p "${BUILD_DIR}/cnbdir"

pack \
extension package "${output}" \
--format file
pushd "${BUILD_DIR}/cnbdir" > /dev/null
cp ../buildpack.tgz .
tar -xvf buildpack.tgz
rm buildpack.tgz

cd $cwd
pack \
extension package "${output}" \
--format file
popd > /dev/null
else
pack \
buildpack package "${output}" \
Expand Down

0 comments on commit 073f2a3

Please sign in to comment.