Skip to content

Commit

Permalink
Make sure setting variable DIR before called on scripts/_build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
nosada committed Sep 7, 2019
1 parent fa399f1 commit 777acc8
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 777acc8

Please sign in to comment.