Skip to content

Commit 4412032

Browse files
paketo-botpaketo-bot
andauthored
Update shared github-config (#18)
Co-authored-by: paketo-bot <paketobuildpacks@paketo.io>
1 parent 2b2ed26 commit 4412032

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

scripts/build.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,28 @@ readonly BUILDPACKDIR="$(cd "${PROGDIR}/.." && pwd)"
88
function main() {
99
mkdir -p "${BUILDPACKDIR}/bin"
1010

11+
if [[ -f "${BUILDPACKDIR}/run/main.go" ]]; then
12+
pushd "${BUILDPACKDIR}/bin" > /dev/null || return
13+
printf "%s" "Building run..."
14+
15+
GOOS=linux \
16+
go build \
17+
-ldflags="-s -w" \
18+
-o "run" \
19+
"${BUILDPACKDIR}/run"
20+
21+
echo "Success!"
22+
23+
for name in detect build; do
24+
printf "%s" "Linking ${name}..."
25+
26+
ln -sf "run" "${name}"
27+
28+
echo "Success!"
29+
done
30+
popd > /dev/null || return
31+
fi
32+
1133
if [[ -f "${BUILDPACKDIR}/main.go" ]]; then
1234
pushd "${BUILDPACKDIR}/bin" > /dev/null || return
1335
printf "%s" "Building run..."

0 commit comments

Comments
 (0)