mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
f2567830b3
* Remove Docker-related build functionality Removed the Docker build scripts, Dockerfile, and docker-compose definitions from the Makefile and relevant directories. Updated documentation by stripping out references to building and running Docker containers. This change likely reflects a shift towards a different deployment strategy or a move away from Docker as a dependency for builds and runtime. This simplification could lead to less complexity in the build process and reduce maintenance overhead associated with Docker configurations. Signed-off-by: SammyOina <sammyoina@gmail.com> * Removed Docker image build and publish workflow The workflow for building and publishing a Docker image on pushes to the main branch has been removed. This step likely reflects a change in deployment strategy or a move to a different CI/CD pipeline. Continuous deployment might now be managed by another service or process, adhering to updated operational requirements or infrastructure changes. Signed-off-by: SammyOina <sammyoina@gmail.com> --------- Signed-off-by: SammyOina <sammyoina@gmail.com>
36 lines
1.0 KiB
Makefile
36 lines
1.0 KiB
Makefile
BUILD_DIR = build
|
|
SERVICES = manager agent cli
|
|
CGO_ENABLED ?= 0
|
|
GOARCH ?= amd64
|
|
VERSION ?= $(shell git describe --abbrev=0 --tags --always)
|
|
COMMIT ?= $(shell git rev-parse HEAD)
|
|
TIME ?= $(shell date +%F_%T)
|
|
CLI_SOURCE = ./cmd/cli/main.go
|
|
CLI_BIN = ${BUILD_DIR}/cocos-cli
|
|
empty:=
|
|
space:= $(empty) $(empty)
|
|
|
|
define compile_service
|
|
CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) \
|
|
go build -ldflags "-s -w \
|
|
-X 'github.com/absmach/magistrala.BuildTime=$(TIME)' \
|
|
-X 'github.com/absmach/magistrala.Version=$(VERSION)' \
|
|
-X 'github.com/absmach/magistrala.Commit=$(COMMIT)'" \
|
|
-o ${BUILD_DIR}/cocos-$(1) cmd/$(1)/main.go
|
|
endef
|
|
|
|
.PHONY: all $(SERVICES)
|
|
|
|
all: $(SERVICES)
|
|
|
|
$(SERVICES):
|
|
$(call compile_service,$(@))
|
|
|
|
|
|
install-cli: cli
|
|
cp ${CLI_BIN} ~/.local/bin/cocos-cli
|
|
|
|
protoc:
|
|
protoc -I. --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative agent/agent.proto
|
|
protoc -I. --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative manager/manager.proto
|