-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 880 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 880 Bytes
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
.PHONY: build deps lint test docker integration-test plugins install-plugins publish-aptly-repo install
BINARY_NAME=sitectl
DOCS_PORT ?= 3000
INSTALL_DIR ?= $(or $(dir $(shell which $(BINARY_NAME) 2>/dev/null)),/usr/local/bin/)
deps:
go get .
go mod tidy
build: deps
go build -o $(BINARY_NAME) .
install: build
sudo cp $(BINARY_NAME) $(INSTALL_DIR)$(BINARY_NAME)
@if [ -d ../sitectl-isle ]; then $(MAKE) -C ../sitectl-isle install; fi
@if [ -d ../sitectl-drupal ]; then $(MAKE) -C ../sitectl-drupal install; fi
lint:
go fmt ./...
golangci-lint run
@if command -v json5 > /dev/null 2>&1; then \
echo "Running json5 validation on renovate.json5"; \
json5 --validate renovate.json5 > /dev/null; \
else \
echo "json5 not found, skipping renovate validation"; \
fi
test: build
go test -v -race ./...
publish-aptly-repo:
bash ./scripts/publish-aptly-repo.sh