-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 843 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (26 loc) · 843 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
TEST_URL ?= https%3A%2F%2Fgithub.com%2Fdaywalker90%2Fcln-nip47
.PHONY: docker-build
## docker-build: Builds the Docker image
docker-build:
@docker build -t jumble-proxy-server .
.PHONY: build
## build: Builds the Go program
build:
@CGO_ENABLED=0 go build -o bin/jumble-proxy-server .
.PHONY: curl
## curl: Run curl to test the endpoint
curl:
curl -X GET http://localhost:8080/sites/$(TEST_URL)
.PHONY: docker-run
## docker-run: Run the container
docker-run: docker-build
@docker run --rm -e ENABLE_PPROF=true -e JUMBLE_PROXY_GITHUB_TOKEN=${JUMBLE_PROXY_GITHUB_TOKEN} -e PORT=8080 -p 8080:8080 jumble-proxy-server:latest
.PHONY: test
## test: Runs the tests
test:
@go test -v -race ./...
.PHONY: help
## help: Prints this help message
help:
@echo "Usage:"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'