s3-share/Makefile
Djeeberjr 80a99aa9c2
Some checks failed
continuous-integration/drone/push Build is failing
added tests to drone
2022-06-08 11:10:29 +02:00

35 lines
514 B
Makefile

BINARY = s3share
BUILD_DIR = build
.PHONY: all
all: clean deps build
.PHONY:build
build: go js
.PHONY: js
js: $(BUILD_DIR)/public
.PHONY: go
go: $(BUILD_DIR)/$(BINARY)
$(BUILD_DIR)/$(BINARY):
go build -o $(BUILD_DIR)/$(BINARY) cmd/s3share.go
$(BUILD_DIR)/public:
npm run build && mkdir -p $(BUILD_DIR) &&cp -r public/ $(BUILD_DIR)/public
.PHONY: deps
deps: node_modules
node_modules:
npm install
.PHONY: test
test:
go test -v ./...
.PHONY:clean
clean:
rm -rf $(BUILD_DIR) && rm -rf public/build/