Skip to content

Commit

Permalink
Merge pull request #572 from nosada/fix-build-error-using-makefile
Browse files Browse the repository at this point in the history
Make sure setting variable `DIR` before called on scripts/_build.sh
  • Loading branch information
hilary committed Sep 7, 2019
2 parents fa399f1 + 777acc8 commit 977c3d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

set -euo pipefail

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../"
OUT_D=${OUT_D:-${DIR}/builds}
mkdir -p "$OUT_D"

base="-X github.com/digitalocean/doctl."
build="$("$DIR"/scripts/version.sh -c)"
ldflags="${base}Build=${build}"
Expand All @@ -16,10 +20,6 @@ ldflags="${ldflags} ${base}Minor=${minor}"
patch="$(echo "$version" | cut -d . -f3)"
ldflags="${ldflags} ${base}Patch=${patch}"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../"
OUT_D=${OUT_D:-${DIR}/builds}
mkdir -p "$OUT_D"

(
export GOOS=${GOOS:-linux}
export GOARCH=${GOARCH:-amd64}
Expand Down

0 comments on commit 977c3d1

Please sign in to comment.