* Implement tests for error functions like errRequiredField, errInvalidField, and errEntityNotFound. * Ensure proper metadata is returned for various error scenarios. * Validate error handling in CRM, Files, and other tools. * Introduce tests for parsing stored file IDs and UUIDs. * Enhance coverage for helper functions related to project resolution and session management.
27 lines
753 B
Makefile
27 lines
753 B
Makefile
BIN_DIR := bin
|
|
SERVER_BIN := $(BIN_DIR)/amcs-server
|
|
CMD_SERVER := ./cmd/amcs-server
|
|
BUILDINFO_PKG := git.warky.dev/wdevs/amcs/internal/buildinfo
|
|
VERSION_TAG ?= $(shell git describe --tags --exact-match 2>/dev/null || echo dev)
|
|
COMMIT_SHA ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
|
BUILD_DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
LDFLAGS := -s -w \
|
|
-X $(BUILDINFO_PKG).Version=$(VERSION_TAG) \
|
|
-X $(BUILDINFO_PKG).TagName=$(VERSION_TAG) \
|
|
-X $(BUILDINFO_PKG).Commit=$(COMMIT_SHA) \
|
|
-X $(BUILDINFO_PKG).BuildDate=$(BUILD_DATE)
|
|
|
|
.PHONY: all build clean migrate
|
|
|
|
all: build
|
|
|
|
build:
|
|
@mkdir -p $(BIN_DIR)
|
|
go build -ldflags "$(LDFLAGS)" -o $(SERVER_BIN) $(CMD_SERVER)
|
|
|
|
migrate:
|
|
./scripts/migrate.sh
|
|
|
|
clean:
|
|
rm -rf $(BIN_DIR)
|