Skip to content

Commit

Permalink
Merge pull request #1549 from paketo-buildpacks/fixes
Browse files Browse the repository at this point in the history
Two fixes for pipeline-builder
  • Loading branch information
dmikusa authored Apr 1, 2024
2 parents 0ce84c3 + c66d538 commit 1a0dcfa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
14 changes: 8 additions & 6 deletions octo/create-package.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail
set -xuo pipefail

# With Go 1.20, we need to set this so that we produce statically compiled binaries
#
Expand All @@ -11,18 +11,20 @@ export CGO_ENABLED=0

if [[ "${INCLUDE_DEPENDENCIES}" == "true" ]]; then
create-package \
--source ${SOURCE_PATH:-.} \
--source "${SOURCE_PATH:-.}" \
--cache-location "${HOME}"/carton-cache \
--destination "${HOME}"/buildpack \
--include-dependencies \
--version "${VERSION}"
else
create-package \
--source ${SOURCE_PATH:-.} \
--source "${SOURCE_PATH:-.}" \
--destination "${HOME}"/buildpack \
--version "${VERSION}"
fi

PACKAGE_FILE=${SOURCE_PATH:-.}/package.toml
[[ -e ${PACKAGE_FILE} ]] && cp ${PACKAGE_FILE} "${HOME}"/package.toml
printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}"/buildpack "${OS}" >> "${HOME}"/package.toml
PACKAGE_FILE="${SOURCE_PATH:-.}/package.toml"
if [ -f "${PACKAGE_FILE}" ]; then
cp "${PACKAGE_FILE}" "${HOME}/buildpack/package.toml"
printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}/buildpack" "${OS}" >> "${HOME}/buildpack/package.toml"
fi
13 changes: 8 additions & 5 deletions octo/package-buildpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

set -euo pipefail

CONFIG="--config "${HOME}"/package.toml"
#TODO with this, we don't need to use the package.toml, because pack exp. does not support it with multi arch yet
if ! [ -f "${PWD}/package.toml" ]; then
cd ~/buildpack
CONFIG=""
COMPILED_BUILDPACK="${HOME}/buildpack"

# create-package puts the buildpack here, we need to run from that directory
# for component buildpacks so that pack doesn't need a package.toml
cd "${COMPILED_BUILDPACK}"
CONFIG=""
if [ -f "${COMPILED_BUILDPACK}/package.toml" ]; then
CONFIG="--config ${COMPILED_BUILDPACK}/package.toml"
fi

PACKAGE_LIST=($PACKAGES)
Expand Down
2 changes: 1 addition & 1 deletion octo/statik/statik.go

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion octo/update-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ RELEASE_NOTES=$(

git add .github/
git add .gitignore
git add scripts/build.sh

if [ -f scripts/build.sh ]; then
git add scripts/build.sh
fi

git checkout -- .

Expand Down

0 comments on commit 1a0dcfa

Please sign in to comment.