Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Update shared github-config (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: paketo-bot <[email protected]>
  • Loading branch information
paketo-bot and paketo-bot authored Jun 5, 2020
1 parent 5327ce9 commit 2046914
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ readonly BUILDPACKDIR="$(cd "${PROGDIR}/.." && pwd)"
function main() {
mkdir -p "${BUILDPACKDIR}/bin"

if [[ -f "${BUILDPACKDIR}/run/main.go" ]]; then
pushd "${BUILDPACKDIR}/bin" > /dev/null || return
printf "%s" "Building run..."

GOOS=linux \
go build \
-ldflags="-s -w" \
-o "run" \
"${BUILDPACKDIR}/run"

echo "Success!"

for name in detect build; do
printf "%s" "Linking ${name}..."

ln -sf "run" "${name}"

echo "Success!"
done
popd > /dev/null || return
fi

if [[ -f "${BUILDPACKDIR}/main.go" ]]; then
pushd "${BUILDPACKDIR}/bin" > /dev/null || return
printf "%s" "Building run..."
Expand Down

0 comments on commit 2046914

Please sign in to comment.