36 lines
743 B
Makefile
36 lines
743 B
Makefile
export LOG_DEBUG=1
|
|
export HTTP_LISTEN=:8085
|
|
export PASTE_STORE=data/paste/
|
|
export ARTIFACT_STORE=data/artifact/
|
|
export IMAGE_STORE=data/image/
|
|
|
|
SOURCE=$(wildcard *.go) $(wildcard paste/*.go) $(wildcard assets/*.go)
|
|
ASSETS=$(wildcard assets/*) $(wildcard assets/public/*) $(wildcard assets/src/*) $(wildcard assets/src/paste/*)
|
|
ASSET_FILE=assets/build/index.html
|
|
BINARY=sour.is-paste
|
|
|
|
all: $(BINARY)
|
|
clean:
|
|
rm -rf $(BINARY)
|
|
setup:
|
|
cd assets; npm i
|
|
fmt:
|
|
go fmt ./...
|
|
test:
|
|
go test ./...
|
|
go vet ./...
|
|
run: $(BINARY)
|
|
go run .
|
|
|
|
build-assets: $(ASSET_FILE)
|
|
${ASSET_FILE}: $(ASSETS)
|
|
cd assets; \
|
|
npm run build
|
|
|
|
build: $(BINARY)
|
|
$(BINARY): $(SOURCE) $(ASSET_FILE)
|
|
go build -o $(BINARY) .
|
|
|
|
.PHONEY: all clean build run setup
|
|
# DO NOT DELETE
|