diff --git a/Makefile b/Makefile deleted file mode 100644 index 7e96732..0000000 --- a/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -OUTPUT_BINARY_NAME = "client" -OUTPUT_DIR_NAME = "client" - - -ASSETS_DIR_NAME = "assets" -BUILD_DIR = "../../build" - -build: - go build -o ${BUILD_DIR}/${OUTPUT_DIR_NAME}/${OUTPUT_BINARY_NAME}${OUTPUT_BINARY_EXT} - @if [ -d ${ASSETS_DIR_NAME} ] && [ -n "`ls -A ${ASSETS_DIR_NAME}`" ] ;then \ - cp -r ${ASSETS_DIR_NAME}/* ${BUILD_DIR}/${OUTPUT_DIR_NAME}/; \ - fi - -clean: - rm -f ${BUILD_DIR}/${OUTPUT_DIR_NAME}/${OUTPUT_BINARY_NAME} \ No newline at end of file diff --git a/magefiles/magefile.go b/magefiles/magefile.go new file mode 100644 index 0000000..6d8bb5a --- /dev/null +++ b/magefiles/magefile.go @@ -0,0 +1,22 @@ +//go:build mage + +package main + +import ( + "magefiles" + "magefiles/utils" + + //mage:import + "magefiles/targets" +) + +var Default = Build + +func Build() error { + return utils.Build(magefiles.BuildArgs{ + OutputBinName: "client", + OutputDirName: "client", + AssetsDir: "assets", + PubArgs: targets.PubGoBuildArgs, + }) +}