Parcourir la source

chore(packages): fix some error for packages (#400)

Rory Z il y a 4 ans
Parent
commit
b72a83233b

+ 1 - 1
deploy/packages/Makefile

@@ -5,7 +5,7 @@ ifneq ($(shell uname -s),Linux)
 	exit
 endif
 # The version-release used for package
-PKG_VSN := $(shell git describe --tags --always)
+export PKG_VSN := $(shell git describe --tags --always)
 
 ifneq ($(shell cat /etc/*-release |grep -o -i centos),)
 	ID := centos

+ 3 - 3
deploy/packages/deb/debian/rules

@@ -10,14 +10,14 @@
 
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
+PKG_VSN ?= develop
 
 ## Clear variables that may confound our build of sub-projects; also
 ## note that it is necessary to use overlay_vars relative to .. as
 ## the generate command EXECUTES in rel/
 build:
-	GO111MODULE=on CGO_ENABLED=1 go build -ldflags="-s -w -X main.Version=0.5.1 -X main.LoadFileType=absolute" -o cli xstream/cli/main.go
-	GO111MODULE=on CGO_ENABLED=1 go build -ldflags="-s -w -X main.Version=0.5.1 -X main.LoadFileType=absolute" -o server xstream/server/main.go
-	if [ ! -z $(which upx) ] && [ "$(uname -m)" == "x86_64" ]; then upx ./cli; upx ./server; fi
+	GO111MODULE=on CGO_ENABLED=1 go build -ldflags="-s -w -X main.Version=$(PKG_VSN) -X main.LoadFileType=absolute" -o cli xstream/cli/main.go
+	GO111MODULE=on CGO_ENABLED=1 go build -ldflags="-s -w -X main.Version=$(PKG_VSN) -X main.LoadFileType=absolute" -o server xstream/server/main.go
 
 clean:
 	dh_clean

+ 0 - 1
deploy/packages/rpm/kuiper.spec

@@ -27,7 +27,6 @@ A lightweight IoT edge analytics software
 cd %{_code_source}
 GO111MODULE=on CGO_ENABLED=1 go build -ldflags="-s -w -X main.Version=%{_version}-%{_release} -X main.LoadFileType=absolute" -o %{_code_source}/cli %{_code_source}/xstream/cli/main.go
 GO111MODULE=on CGO_ENABLED=1 go build -ldflags="-s -w -X main.Version=%{_version}-%{_release} -X main.LoadFileType=absolute" -o %{_code_source}/server %{_code_source}/xstream/server/main.go
-if [ ! -z $(which upx) ] && [ "$(uname -m)" == "x86_64" ]; then upx ./cli; upx ./server; fi
 cd -
 
 %install