s3-share/Makefile

35 lines
514 B
Makefile
Raw Normal View History

2022-05-13 09:58:32 +00:00
BINARY = s3share
BUILD_DIR = build
.PHONY: all
2022-05-16 23:10:47 +00:00
all: clean deps build
2022-05-13 09:58:32 +00:00
.PHONY:build
2022-05-16 23:55:32 +00:00
build: go js
.PHONY: js
js: $(BUILD_DIR)/public
.PHONY: go
go: $(BUILD_DIR)/$(BINARY)
2022-05-13 09:58:32 +00:00
$(BUILD_DIR)/$(BINARY):
go build -o $(BUILD_DIR)/$(BINARY) cmd/s3share.go
$(BUILD_DIR)/public:
2022-05-16 23:55:32 +00:00
npm run build && mkdir -p $(BUILD_DIR) &&cp -r public/ $(BUILD_DIR)/public
2022-05-13 09:58:32 +00:00
2022-05-16 23:10:47 +00:00
.PHONY: deps
deps: node_modules
node_modules:
npm install
2022-06-08 09:10:29 +00:00
.PHONY: test
test:
go test -v ./...
2022-05-13 09:58:32 +00:00
.PHONY:clean
clean:
rm -rf $(BUILD_DIR) && rm -rf public/build/