X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=cmd%2Fbpa-restapi-agent%2FMakefile;h=2e703650db888081f530f7248e6eaf2c311fead3;hb=06e42f9aff0d369a8d7f4f48b309f313003f2d7e;hp=ba40a6ff6d53f65b4f5f6ef0413b09e05f144dad;hpb=d405dd38324cda90cbf1849b3c52a62cd4c878ac;p=icn.git diff --git a/cmd/bpa-restapi-agent/Makefile b/cmd/bpa-restapi-agent/Makefile index ba40a6f..2e70365 100644 --- a/cmd/bpa-restapi-agent/Makefile +++ b/cmd/bpa-restapi-agent/Makefile @@ -1,24 +1,32 @@ -# The name of the executable (default is current directory name) -TARGET := $(shell echo $${PWD\#\#*/}) -.DEFAULT_GOAL: $(TARGET) - -# These will be provided to the target -VERSION := 1.0.0 -BUILD := `git rev-parse HEAD` - -# Use linker flags to provide version/build settings to the target -LDFLAGS=-ldflags "-X=main.Version=$(VERSION) -X=main.Build=$(BUILD)" - -# go source files, ignore vendor directory -SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*") - -.PHONY: all build - -all: build - -$(TARGET): $(SRC) - @go build $(LDFLAGS) -o $(TARGET) - -build: $(TARGET) - @true +# # The name of the executable (default is current directory name) +# TARGET := $(shell echo $${PWD\#\#*/}) +# .DEFAULT_GOAL: $(TARGET) +# +# # These will be provided to the target +# VERSION := 1.0.0 +# BUILD := `git rev-parse HEAD` +# +# # Use linker flags to provide version/build settings to the target +# LDFLAGS=-ldflags "-X=main.Version=$(VERSION) -X=main.Build=$(BUILD)" +# +# # go source files, ignore vendor directory +# SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*") +# +# .PHONY: all build +# +# all: build +# +# $(TARGET): $(SRC) +# @go build $(LDFLAGS) -o $(TARGET) +# +# build: $(TARGET) +# @true + +.PHONY: build + +build: + go build -mod=vendor -o build/_output/bin/bpa-restapi-agent main.go + +docker: + docker build -t akraino.org/icn/bpa-restapi-agent:latest . -f build/Dockerfile