added Makefile

This commit is contained in:
Djeeberjr 2022-05-13 11:58:32 +02:00
parent c1b4225b34
commit a4593c9d5c
2 changed files with 19 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/node_modules/ /node_modules/
/public/build/ /public/build/
/build/

18
Makefile Normal file
View File

@ -0,0 +1,18 @@
BINARY = s3share
BUILD_DIR = build
.PHONY: all
all: clean build
.PHONY:build
build: $(BUILD_DIR)/$(BINARY) $(BUILD_DIR)/public
$(BUILD_DIR)/$(BINARY):
go build -o $(BUILD_DIR)/$(BINARY) cmd/s3share.go
$(BUILD_DIR)/public:
npm run build && cp -r public/ $(BUILD_DIR)/public
.PHONY:clean
clean:
rm -rf $(BUILD_DIR) && rm -rf public/build/