forked from SOL-Strategies/solana-validator-failover
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 1.27 KB
/
Makefile
File metadata and controls
36 lines (29 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
export APP_NAME ?= solana-validator-failover
export APP_VERSION ?= dev
export SRC_DIR ?= .
export BUILD_DIR ?= $(SRC_DIR)/bin
export BUILD_OS_ARCH_LIST ?= linux-amd64 # can use linux-amd64,darwin-arm64
export CI ?= false
dev:
docker compose stop
docker compose rm --force
APP_NAME=$(APP_NAME) APP_VERSION=$(APP_VERSION) BUILD_OS_ARCH_LIST=$(BUILD_OS_ARCH_LIST) CI=$(CI) docker compose up --build --remove-orphans dev
build-compose:
docker compose stop
docker compose rm --force
touch release-notes.md
APP_NAME=$(APP_NAME) APP_VERSION=$(APP_VERSION) BUILD_OS_ARCH_LIST=$(BUILD_OS_ARCH_LIST) CI=$(CI) docker compose up --exit-code-from build --build --remove-orphans build
test-compose:
docker compose stop
docker compose rm --force
APP_NAME=$(APP_NAME) APP_VERSION=$(APP_VERSION) BUILD_OS_ARCH_LIST=$(BUILD_OS_ARCH_LIST) CI=$(CI) docker compose up --exit-code-from test --build --remove-orphans test
gh-release:
./scripts/gh-release.sh
hot-reload:
@echo "running with hotreload..."
@air -c .air.conf
test:
echo -n "${APP_VERSION}" >"pkg/constants/app.version"
go test ./...
build:
BUILD_DIR=$(BUILD_DIR) APP_NAME=$(APP_NAME) APP_VERSION=$(APP_VERSION) BUILD_OS_ARCH_LIST=$(BUILD_OS_ARCH_LIST) CI=$(CI) ./scripts/build.sh