From 36874c335a3363ec4f0964b8db565e11ab798eb3 Mon Sep 17 00:00:00 2001 From: hippo-an Date: Mon, 1 Jul 2024 14:20:55 +0900 Subject: [PATCH] add make file in project root directory to build and run the cm-butterfly --- .dockerignore | 3 ++- .gitignore | 4 +++- Makefile | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Makefile diff --git a/.dockerignore b/.dockerignore index dcd6fc1e..841c4e4c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,4 +3,5 @@ CODE_OF_CONDUCT.md CONTRIBUTING.md README.md .git -.idea \ No newline at end of file +.idea +bin/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 520c65ad..1996b8e8 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ conf/*.env conf/setup.env !conf/setup.sample.env -data/* \ No newline at end of file +data/* + +bin/* \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..c644e1ee --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +SHELL := /bin/bash + +.PHONY: build +build: + @go build -o ./bin/butterfly main.go + @echo "CM-Butterfly build complete." + +.PHONY: config +config: + @source ./conf/setup.env + @echo "CM-Butterfly is configured." + +.PHONY: build-run +build-run: build config + @./bin/butterfly + +.PHONY: run +run: config + @go run main.go \ No newline at end of file