We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b2ed26 commit 4412032Copy full SHA for 4412032
1 file changed
scripts/build.sh
@@ -8,6 +8,28 @@ readonly BUILDPACKDIR="$(cd "${PROGDIR}/.." && pwd)"
8
function main() {
9
mkdir -p "${BUILDPACKDIR}/bin"
10
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
29
+ done
30
+ popd > /dev/null || return
31
+ fi
32
33
if [[ -f "${BUILDPACKDIR}/main.go" ]]; then
34
pushd "${BUILDPACKDIR}/bin" > /dev/null || return
35
printf "%s" "Building run..."
0 commit comments