eth-tracker/Makefile
Mohamed Sohail 天明 efc84970cc
refactor: Decouple router and handlers (#31)
* refactor: decouple router to allow adding custom log and input data handlers

* feat: refactor handlers

* devops: update service build args

* chore: cleanup unecessary files/code
2024-09-18 17:35:57 +03:00

24 lines
681 B
Makefile

BIN := celo-tracker
BOOTSTRAP_BIN := celo-tracker-cache-bootstrap
DB_FILE := tracker_db
BUILD_CONF := CGO_ENABLED=1 GOOS=linux GOARCH=amd64
BUILD_COMMIT := $(shell git rev-parse --short HEAD 2> /dev/null)
DEBUG := DEV=true
.PHONY: build run run-bootstrap clean clean-debug
clean:
rm ${BIN} ${BOOTSTRAP_BIN}
clean-db:
rm ${DB_FILE}
build:
${BUILD_CONF} go build -ldflags="-X main.build=${BUILD_COMMIT} -s -w" -o ${BOOTSTRAP_BIN} cmd/bootstrap/main.go
${BUILD_CONF} go build -ldflags="-X main.build=${BUILD_COMMIT} -s -w" -o ${BIN} cmd/service/*.go
run-bootstrap:
${BUILD_CONF} ${DEBUG} go run cmd/bootstrap/main.go
run:
${BUILD_CONF} ${DEBUG} go run cmd/service/main.go