diff --git a/Makefile b/Makefile index 2b37d95..9fbcbe5 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ GREEN=\033[0;32m BLUE=\033[0;34m NC=\033[0m -MODS = $(shell sed -e ':a' -e 'N' -e '$$!ba' -e 's/\n/\\n/g' goent.diff) +MODS = $(shell sed -e ':a' -e 'N' -e '$$!ba' -e 's/\n/@/g' goent.diff) help: Makefile @printf "${BLUE}Choose a command run:${NC}\n" @@ -66,7 +66,7 @@ build: installent: cd internal/repo && packr cp imports/imports.go.template imports/imports.go - @sed "s?)?$(MODS)\n)?" go.mod > goent.mod + @sed "s?)?$(MODS)@)?" go.mod | tr '@' '\n' > goent.mod $(GO) install -tags ent -ldflags '${GOLDFLAGS}' -modfile goent.mod ./cmd/${APP_NAME} @printf "${GREEN}Install bitxhub ent successfully!${NC}\n" @@ -74,7 +74,7 @@ buildent: cd internal/repo && packr @mkdir -p bin cp imports/imports.go.template imports/imports.go - @sed "s?)?$(MODS)\n)?" go.mod > goent.mod + @sed "s?)?$(MODS)@)?" go.mod | tr '@' '\n' > goent.mod $(GO) build -tags ent -ldflags '${GOLDFLAGS}' -modfile goent.mod ./cmd/${APP_NAME} @mv ./bitxhub bin @printf "${GREEN}Build bitxhub ent successfully!${NC}\n"