Remove BPA operator
[icn.git] / cmd / bpa-restapi-agent / Makefile
index ba40a6f..6437dc3 100644 (file)
@@ -1,24 +1,22 @@
+.PHONY: build
 
-# The name of the executable (default is current directory name)
-TARGET := $(shell echo $${PWD\#\#*/})
-.DEFAULT_GOAL: $(TARGET)
+build:
+       go build -o build/_output/bin/bpa-restapi-agent main.go
 
-# These will be provided to the target
-VERSION := 1.0.0
-BUILD := `git rev-parse HEAD`
+docker:        
+       docker build -t akraino.org/icn/bpa-restapi-agent:latest . -f build/Dockerfile  
 
-# Use linker flags to provide version/build settings to the target
-LDFLAGS=-ldflags "-X=main.Version=$(VERSION) -X=main.Build=$(BUILD)"
+deploy: docker
+       ./bpa_api_install.sh
 
-# go source files, ignore vendor directory
-SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
+unit_test: go_install
+       go test ./internal/app
 
-.PHONY: all build
+go_install:
+       ./install_go.sh
 
-all: build
+e2e_test: deploy
+       ./e2e_test.sh
 
-$(TARGET): $(SRC)
-       @go build $(LDFLAGS) -o $(TARGET)
-
-build: $(TARGET)
-       @true
+clean:
+       ./bpa_api_uninstall.sh