Skip to content

Commit

Permalink
Append .tgz extension onto packaged buildpacks
Browse files Browse the repository at this point in the history
[#170504759]
  • Loading branch information
ForestEckhardt committed Jan 15, 2020
1 parent 4920e8f commit 1b64992
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integration/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package integration

import (
"errors"
"fmt"
"reflect"
"strings"
"testing"
Expand Down Expand Up @@ -34,6 +35,10 @@ func TestIntegration(t *testing.T) {
offlineNodeBuildpack, _, err = dagger.PackageCachedBuildpack(root)
Expect(err).NotTo(HaveOccurred())

// HACK: we need to fix dagger and the package.sh scripts so that this isn't required
nodeBuildpack = fmt.Sprintf("%s.tgz", nodeBuildpack)
offlineNodeBuildpack = fmt.Sprintf("%s.tgz", offlineNodeBuildpack)

defer func() {
dagger.DeleteBuildpack(nodeBuildpack)
dagger.DeleteBuildpack(offlineNodeBuildpack)
Expand Down
4 changes: 4 additions & 0 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ if [[ -n "${offline}" ]]; then
extra_args+="--offline"
fi

if [[ "${PACKAGE_DIR}" != "*.tgz" ]]; then
PACKAGE_DIR="${PACKAGE_DIR}.tgz"
fi

.bin/jam pack \
--buildpack "$(pwd)/buildpack.toml" \
--version "${version}" \
Expand Down

0 comments on commit 1b64992

Please sign in to comment.