2023-10-19 17:05:41 -06:00
|
|
|
export LOG_DEBUG=1
|
|
|
|
export HTTP_LISTEN=:8085
|
|
|
|
export PASTE_STORE=data/paste/
|
|
|
|
export ARTIFACT_STORE=data/artifact/
|
|
|
|
export IMAGE_STORE=data/image/
|
2018-02-15 09:11:52 -07:00
|
|
|
|
2023-10-19 17:05:41 -06:00
|
|
|
SOURCE=$(wildcard v2/*.go) $(wildcard v2/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
|
2018-03-14 07:18:19 -06:00
|
|
|
|
2017-04-24 09:20:46 -06:00
|
|
|
all: $(BINARY)
|
|
|
|
clean:
|
2020-08-17 12:23:38 -06:00
|
|
|
rm -rf $(BINARY)
|
2018-03-13 16:25:18 -06:00
|
|
|
setup:
|
2023-10-19 17:05:41 -06:00
|
|
|
cd assets; npm i
|
2018-03-15 11:13:59 -06:00
|
|
|
fmt:
|
|
|
|
go fmt ./...
|
2023-10-19 17:05:41 -06:00
|
|
|
test:
|
2020-08-17 09:40:10 -06:00
|
|
|
go test ./...
|
|
|
|
go vet ./...
|
2023-10-19 17:05:41 -06:00
|
|
|
run: $(BINARY)
|
|
|
|
# go run ./v2
|
|
|
|
./$(BINARY)
|
2017-05-22 11:13:47 -06:00
|
|
|
|
2023-10-19 17:05:41 -06:00
|
|
|
build-assets: $(ASSET_FILE)
|
|
|
|
${ASSET_FILE}: $(ASSETS)
|
2017-04-24 09:20:46 -06:00
|
|
|
cd assets; \
|
2023-10-19 17:05:41 -06:00
|
|
|
npm run build
|
2020-09-07 10:45:20 -06:00
|
|
|
|
2023-10-19 17:05:41 -06:00
|
|
|
build: $(BINARY)
|
|
|
|
$(BINARY): $(SOURCE) $(ASSET_FILE)
|
|
|
|
go build -o $(BINARY) ./v2
|
2017-04-24 09:20:46 -06:00
|
|
|
|
2023-10-19 17:05:41 -06:00
|
|
|
.PHONEY: all clean build run setup
|
2019-09-06 15:08:50 -06:00
|
|
|
# DO NOT DELETE
|