Skip to content

Commit

Permalink
feat: add -cover build to master branch
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <poan.yang@suse.com>
  • Loading branch information
FrankYang0529 authored and David Ko committed Nov 15, 2023
1 parent 8d6d46b commit ac63f7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ set -e

source $(dirname $0)/version

if [ "$(git rev-parse --abbrev-ref HEAD)" = "master" ]; then
COVER="-cover"
COVERPKG="-coverpkg=github.com/longhorn/longhorn-engine/..."
fi

cd $(dirname $0)/..

mkdir -p bin
Expand All @@ -11,4 +16,4 @@ go build -tags netgo -ldflags \
-X main.GitCommit=$GITCOMMIT \
-X main.BuildDate=$BUILDDATE \
-linkmode external -extldflags -static" \
-o bin/longhorn
"$COVER" "$COVERPKG" -o bin/longhorn

0 comments on commit ac63f7f

Please sign in to comment.