Skip to content

Commit

Permalink
Fix build script paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasrunge committed Jan 14, 2021
1 parent b2ce4b8 commit bae4d72
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
V=$1

function build {
Expand All @@ -13,13 +14,13 @@ function build {
-X 'barf/internal/config.BuildTime=$(date)' \
-X 'barf/internal/config.BuildChecksum=$(git rev-parse HEAD)'\
\" \
-o \"../build/$GOOS-$GOARCH$GOARM/barf\" ../cmd/barf/main.go"
-o \"$DIR/../build/$GOOS-$GOARCH$GOARM/barf\" $DIR/../cmd/barf/main.go"
bash -c "\
pushd ../build/$GOOS-$GOARCH$GOARM &> /dev/null && \
pushd $DIR/../build/$GOOS-$GOARCH$GOARM &> /dev/null && \
tar -czf ../barf-$GOOS-$GOARCH$GOARM.tar.gz * && \
popd &> /dev/null\
"
SIZE=$(stat -c%s "../build/barf-$GOOS-$GOARCH$GOARM.tar.gz")
SIZE=$(stat -c%s "$DIR/../build/barf-$GOOS-$GOARCH$GOARM.tar.gz")
echo "barf-$GOOS-$GOARCH$GOARM.tar.gz ($SIZE bytes) complete!"
echo ""
}
Expand Down

0 comments on commit bae4d72

Please sign in to comment.