diff --git a/.gitignore b/.gitignore index ad09d97..65a1c62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules/ /public/build/ +/build/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9793ad3 --- /dev/null +++ b/Makefile @@ -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/