From a4593c9d5c0ec6023543e9850394e0e44c8cd689 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Fri, 13 May 2022 11:58:32 +0200 Subject: [PATCH] added Makefile --- .gitignore | 1 + Makefile | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 Makefile 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/