From 2da55f411bfdd9619258e5aa73fdbc377fcb978e Mon Sep 17 00:00:00 2001 From: AlteredCoder <64792091+AlteredCoder@users.noreply.github.com> Date: Wed, 29 Jul 2020 17:14:32 +0200 Subject: [PATCH] remove data folder from release and fix binary size (#160) --- Makefile | 1 - cmd/crowdsec-cli/Makefile | 1 + cmd/crowdsec/Makefile | 2 +- wizard.sh | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 06a07fa78..a91f3393b 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,6 @@ release: check_release build @cp $(CROWDSEC_FOLDER)/$(CROWDSEC_BIN) $(RELDIR)/cmd/crowdsec @cp $(CSCLI_FOLDER)/$(CSCLI_BIN) $(RELDIR)/cmd/crowdsec-cli @cp -R ./config/ $(RELDIR) - @cp -R ./data/ $(RELDIR) @cp wizard.sh $(RELDIR) @cp scripts/test_env.sh $(RELDIR) @bash ./scripts/build_plugins.sh diff --git a/cmd/crowdsec-cli/Makefile b/cmd/crowdsec-cli/Makefile index 442aa2a42..32e8388da 100644 --- a/cmd/crowdsec-cli/Makefile +++ b/cmd/crowdsec-cli/Makefile @@ -7,6 +7,7 @@ GOGET=$(GOCMD) get BINARY_NAME=cscli PREFIX?="/" BIN_PREFIX = $(PREFIX)"/usr/local/bin/" +LD_OPTS=-ldflags="-s -w" all: clean build diff --git a/cmd/crowdsec/Makefile b/cmd/crowdsec/Makefile index db92a2f99..bb9239dbb 100644 --- a/cmd/crowdsec/Makefile +++ b/cmd/crowdsec/Makefile @@ -13,7 +13,7 @@ DATA_PREFIX = $(PREFIX)"/var/run/crowdsec/" PID_DIR = $(PREFIX)"/var/run/" SYSTEMD_PATH_FILE="/etc/systemd/system/crowdsec.service" - +LD_OPTS=-ldflags="-s -w" all: clean test build diff --git a/wizard.sh b/wizard.sh index 9091b09f2..07fd86de4 100755 --- a/wizard.sh +++ b/wizard.sh @@ -286,7 +286,6 @@ install_plugins_bin() { #install crowdsec and cscli install_crowdsec() { mkdir -p "${CROWDSEC_DATA_DIR}" - find data -type f -exec install -Dm 755 {} "${CROWDSEC_LIB_DIR}/{}" \; || exit (cd config && find patterns -type f -exec install -Dm 755 "{}" "${CROWDSEC_CONFIG_PATH}/{}" \; && cd ../) || exit mkdir -p "${CROWDSEC_CONFIG_PATH}/scenarios" || exit mkdir -p "${CROWDSEC_CONFIG_PATH}/postoverflows" || exit