diff --git a/scripts/build.sh b/scripts/build.sh index 4cdf1b1..827c1f6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -set -eu + +set -e +set -u set -o pipefail readonly PROGDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -30,28 +32,6 @@ function main() { popd > /dev/null || return fi - if [[ -f "${BUILDPACKDIR}/main.go" ]]; then - pushd "${BUILDPACKDIR}/bin" > /dev/null || return - printf "%s" "Building run..." - - GOOS=linux \ - go build \ - -ldflags="-s -w" \ - -o "run" \ - "${BUILDPACKDIR}" - - 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 [[ -d "${BUILDPACKDIR}/cmd" ]]; then local name for src in "${BUILDPACKDIR}"/cmd/*; do