Refactor: JJB code
[ci-management.git] / jjb / ric-plt-sdlgo / prescan-sdlgo-go-ubuntu.sh
index b9c27b5..fab3f08 100644 (file)
@@ -44,6 +44,7 @@ export PATH=$GOPATH/bin:$PATH
 export CFG_FILE=../config/config-file.json
 export RMR_SEED_RT=../config/uta_rtg.rt
 
+# shellcheck disable=SC2034
 GO111MODULE=on GO_ENABLED=0 GOOS=linux
 
 # setup version tag
@@ -51,18 +52,20 @@ if [ -f container-tag.yaml ]
 then
     tag=$(grep "tag:" container-tag.yaml | awk '{print $2}')
 else
+    # shellcheck disable=SC2034
     tag="no-tag-found"
 fi
 
+# shellcheck disable=SC2034
 hash=$(git rev-parse --short HEAD || true)
 
 # Build
 
-go build -a -installsuffix cgo -ldflags "-X main.Version=$tag -X main.Hash=$hash" -o ./cmd/*.go
+go build ./...
 
 # Execute UT and measure coverage
 
-go test . -v -coverprofile cover.out || true
+go test ./... -v -coverprofile cover.out || true
 
 echo "--> build_sdlgo_ubuntu.sh ends"