export LOG_DEBUG=1 export HTTP_LISTEN=:8085 export PASTE_STORE=data/paste/ export ARTIFACT_STORE=data/artifact/ export IMAGE_STORE=data/image/ export CGO_ENABLED=0 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 ./v2 ./$(BINARY) 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