Merge pull request #2899 from taosdata/patch/pump-up-alert-ver

pump up alert version to 2.0
This commit is contained in:
Shengliang Guan 2020-08-03 16:00:50 +08:00 committed by GitHub
commit 3a49e58723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -119,7 +119,7 @@ WantedBy=multi-user.target
return nil return nil
} }
const version = "TDengine alert v1.0.0" const version = "TDengine alert v2.0.0.0"
func main() { func main() {
var ( var (

View File

@ -5,7 +5,7 @@ go 1.14
require ( require (
github.com/jmoiron/sqlx v1.2.0 github.com/jmoiron/sqlx v1.2.0
github.com/mattn/go-sqlite3 v2.0.3+incompatible github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/taosdata/driver-go master github.com/taosdata/driver-go v0.0.0-20200727182616-1a3b1941c206
go.uber.org/zap v1.14.1 go.uber.org/zap v1.14.1
google.golang.org/appengine v1.6.5 // indirect google.golang.org/appengine v1.6.5 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c

View File

@ -1,12 +1,13 @@
set -e set -e
# releash.sh -c [arm | arm64 | x64 | x86] # releash.sh -c [armv6l | arm64 | amd64 | 386]
# -o [linux | darwin | windows] # -o [linux | darwin | windows]
# set parameters by default value # set parameters by default value
cpuType=x64 # [arm | arm64 | x64 | x86] cpuType=amd64 # [armv6l | arm64 | amd64 | 386]
osType=linux # [linux | darwin | windows] osType=linux # [linux | darwin | windows]
declare -A archMap=(["armv6l"]="arm" ["arm64"]="arm64" ["amd64"]="x64" ["386"]="x86")
while getopts "h:c:o:" arg while getopts "h:c:o:" arg
do do
case $arg in case $arg in
@ -19,7 +20,7 @@ do
osType=$(echo $OPTARG) osType=$(echo $OPTARG)
;; ;;
h) h)
echo "Usage: `basename $0` -c [arm | arm64 | x64 | x86] -o [linux | darwin | windows]" echo "Usage: `basename $0` -c [armv6l | arm64 | amd64 | 386] -o [linux | darwin | windows]"
exit 0 exit 0
;; ;;
?) #unknown option ?) #unknown option
@ -35,6 +36,7 @@ scriptdir=$(dirname $(readlink -f $0))
cd ${scriptdir}/cmd/alert cd ${scriptdir}/cmd/alert
version=$(grep 'const version =' main.go | awk '{print $NF}') version=$(grep 'const version =' main.go | awk '{print $NF}')
version=${version%\"} version=${version%\"}
version=${version:1}
echo "cpuType=${cpuType}" echo "cpuType=${cpuType}"
echo "osType=${osType}" echo "osType=${osType}"
@ -42,4 +44,4 @@ echo "version=${version}"
GOOS=${osType} GOARCH=${cpuType} go build GOOS=${osType} GOARCH=${cpuType} go build
GZIP=-9 tar -zcf ${startdir}/tdengine-alert-${version}-${osType}-${cpuType}.tar.gz alert alert.cfg install_driver.sh driver/ tar -I 'gzip -9' -cf ${startdir}/TDengine-alert-${version}-${osType^}-${archMap[${cpuType}]}.tar.gz alert alert.cfg install_driver.sh driver/