Moving BBSim entrypoint in the cmd folder, building bbsimctl in the container
Change-Id: I4823578ed17c40b13c1c9a561e7aa7e6640f7f19
diff --git a/Makefile b/Makefile
index b2595bd..50f281f 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@
gocover-cobertura < ./tests/results/go-test-coverage.out > ./tests/results/go-test-coverage.xml
docker-build: # @HELP Build a docker container
- docker build --build-arg GIT_STATUS=${GIT_STATUS} -t ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG} -f build/package/Dockerfile .
+ docker build -t ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG} -f build/package/Dockerfile .
docker-push: # @HELP Push a docker container to a registry
docker push ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG}
@@ -69,15 +69,15 @@
-X main.commitHash=$(shell git log --pretty=format:%H -n 1) \
-X main.gitStatus=${GIT_STATUS} \
-X main.version=${VERSION}" \
- -o ./cmd/bbsim ./internal/bbsim
+ ./cmd/bbsim
build-bbsimctl:
GO111MODULE=on go build -i -v -mod vendor \
- -ldflags "-X github.com/opencord/bbsim/internal/bbsimctl/config.BuildTime=$(shell date +”%Y/%m/%d-%H:%M:%S”) \
- -X github.com/opencord/bbsim/internal/bbsimctl/config.CommitHash=$(shell git log --pretty=format:%H -n 1) \
- -X github.com/opencord/bbsim/internal/bbsimctl/config.GitStatus=${GIT_STATUS} \
- -X github.com/opencord/bbsim/internal/bbsimctl/config.Version=${VERSION}" \
- ./cmd/bbsimctl
+ -ldflags "-X github.com/opencord/bbsim/internal/bbsimctl/config.BuildTime=$(shell date +”%Y/%m/%d-%H:%M:%S”) \
+ -X github.com/opencord/bbsim/internal/bbsimctl/config.CommitHash=$(shell git log --pretty=format:%H -n 1) \
+ -X github.com/opencord/bbsim/internal/bbsimctl/config.GitStatus=${GIT_STATUS} \
+ -X github.com/opencord/bbsim/internal/bbsimctl/config.Version=${VERSION}" \
+ ./cmd/bbsimctl
api/openolt/openolt.pb.go: api/openolt/openolt.proto
@protoc -I . \