From 51c63bdaa5be1178b91368e505524461ef4f1c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xinfan=2Ewu=28=E5=90=B4=E6=AD=86=E5=B8=86=29?= Date: Sun, 17 Nov 2024 11:14:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:go=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E5=8E=BB=E6=8E=89-i=EF=BC=8C=E6=96=B0=E5=A2=9Eversion=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- echo/tcp-echo/client/app/version.go | 16 ++++++++++++++++ echo/tcp-echo/client/assembly/common/build.sh | 13 ++++++------- echo/tcp-echo/server/app/version.go | 16 ++++++++++++++++ echo/tcp-echo/server/assembly/common/build.sh | 13 ++++++------- echo/udp-echo/client/app/version.go | 16 ++++++++++++++++ echo/udp-echo/client/assembly/common/build.sh | 13 ++++++------- echo/udp-echo/server/app/version.go | 16 ++++++++++++++++ echo/udp-echo/server/assembly/common/build.sh | 13 ++++++------- echo/ws-echo/client/app/version.go | 16 ++++++++++++++++ echo/ws-echo/client/assembly/common/build.sh | 13 ++++++------- echo/ws-echo/server/app/version.go | 16 ++++++++++++++++ echo/ws-echo/server/assembly/common/build.sh | 13 ++++++------- echo/wss-echo/client/app/version.go | 16 ++++++++++++++++ echo/wss-echo/client/assembly/common/build.sh | 13 ++++++------- echo/wss-echo/server/app/version.go | 16 ++++++++++++++++ echo/wss-echo/server/assembly/common/build.sh | 13 ++++++------- micro/client/app/version.go | 16 ++++++++++++++++ micro/client/assembly/common/build.sh | 13 ++++++------- micro/server/app/version.go | 16 ++++++++++++++++ micro/server/assembly/common/build.sh | 13 ++++++------- rpc/client/app/version.go | 16 ++++++++++++++++ rpc/client/assembly/common/build.sh | 13 ++++++------- rpc/server/app/version.go | 16 ++++++++++++++++ rpc/server/assembly/common/build.sh | 13 ++++++------- 24 files changed, 264 insertions(+), 84 deletions(-) create mode 100644 echo/tcp-echo/client/app/version.go create mode 100644 echo/tcp-echo/server/app/version.go create mode 100644 echo/udp-echo/client/app/version.go create mode 100644 echo/udp-echo/server/app/version.go create mode 100644 echo/ws-echo/client/app/version.go create mode 100644 echo/ws-echo/server/app/version.go create mode 100644 echo/wss-echo/client/app/version.go create mode 100644 echo/wss-echo/server/app/version.go create mode 100644 micro/client/app/version.go create mode 100644 micro/server/app/version.go create mode 100644 rpc/client/app/version.go create mode 100644 rpc/server/app/version.go diff --git a/echo/tcp-echo/client/app/version.go b/echo/tcp-echo/client/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/tcp-echo/client/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/tcp-echo/client/assembly/common/build.sh b/echo/tcp-echo/client/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/tcp-echo/client/assembly/common/build.sh +++ b/echo/tcp-echo/client/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/echo/tcp-echo/server/app/version.go b/echo/tcp-echo/server/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/tcp-echo/server/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/tcp-echo/server/assembly/common/build.sh b/echo/tcp-echo/server/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/tcp-echo/server/assembly/common/build.sh +++ b/echo/tcp-echo/server/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/echo/udp-echo/client/app/version.go b/echo/udp-echo/client/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/udp-echo/client/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/udp-echo/client/assembly/common/build.sh b/echo/udp-echo/client/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/udp-echo/client/assembly/common/build.sh +++ b/echo/udp-echo/client/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/echo/udp-echo/server/app/version.go b/echo/udp-echo/server/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/udp-echo/server/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/udp-echo/server/assembly/common/build.sh b/echo/udp-echo/server/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/udp-echo/server/assembly/common/build.sh +++ b/echo/udp-echo/server/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/echo/ws-echo/client/app/version.go b/echo/ws-echo/client/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/ws-echo/client/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/ws-echo/client/assembly/common/build.sh b/echo/ws-echo/client/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/ws-echo/client/assembly/common/build.sh +++ b/echo/ws-echo/client/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/echo/ws-echo/server/app/version.go b/echo/ws-echo/server/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/ws-echo/server/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/ws-echo/server/assembly/common/build.sh b/echo/ws-echo/server/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/ws-echo/server/assembly/common/build.sh +++ b/echo/ws-echo/server/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/echo/wss-echo/client/app/version.go b/echo/wss-echo/client/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/wss-echo/client/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/wss-echo/client/assembly/common/build.sh b/echo/wss-echo/client/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/wss-echo/client/assembly/common/build.sh +++ b/echo/wss-echo/client/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/echo/wss-echo/server/app/version.go b/echo/wss-echo/server/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/echo/wss-echo/server/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/echo/wss-echo/server/assembly/common/build.sh b/echo/wss-echo/server/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/echo/wss-echo/server/assembly/common/build.sh +++ b/echo/wss-echo/server/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/micro/client/app/version.go b/micro/client/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/micro/client/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/micro/client/assembly/common/build.sh b/micro/client/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/micro/client/assembly/common/build.sh +++ b/micro/client/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/micro/server/app/version.go b/micro/server/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/micro/server/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/micro/server/assembly/common/build.sh b/micro/server/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/micro/server/assembly/common/build.sh +++ b/micro/server/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/rpc/client/app/version.go b/rpc/client/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/rpc/client/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/rpc/client/assembly/common/build.sh b/rpc/client/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/rpc/client/assembly/common/build.sh +++ b/rpc/client/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* - diff --git a/rpc/server/app/version.go b/rpc/server/app/version.go new file mode 100644 index 0000000..99c92a1 --- /dev/null +++ b/rpc/server/app/version.go @@ -0,0 +1,16 @@ +/* +***************************************************** +# DESC : echo stream parser +# AUTHOR : Alex Stocks +# LICENCE : Apache License 2.0 +# EMAIL : alexstocks@foxmail.com +# MOD : 2016-09-04 13:08 +# FILE : readwriter.go +***************************************************** +*/ + +package main + +var ( + Version = "1.0.0" +) diff --git a/rpc/server/assembly/common/build.sh b/rpc/server/assembly/common/build.sh index 0076372..d1c0ea2 100644 --- a/rpc/server/assembly/common/build.sh +++ b/rpc/server/assembly/common/build.sh @@ -11,28 +11,28 @@ rm -rf target/ -PROJECT_HOME=`pwd` +PROJECT_HOME=$(pwd) TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=$(cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}') if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi TARGET_NAME=${TARGET_FOLDER}/${TARGET_SBIN_NAME} -if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then +if [[ $PROFILE == "dev" || $PROFILE == "test" ]]; then # GFLAGS=-gcflags "-N -l" -race -x -v # -x会把go build的详细过程输出 # GFLAGS=-gcflags "-N -l" -race -v # GFLAGS="-gcflags \"-N -l\" -v" - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -gcflags "-N -l" -x -v -o ${TARGET_NAME} && cd - else # -s去掉符号表(然后panic时候的stack trace就没有任何文件名/行号信息了,这个等价于普通C/C++程序被strip的效果), # -w去掉DWARF调试信息,得到的程序就不能用gdb调试了。-s和-w也可以分开使用,一般来说如果不打算用gdb调试, # -w基本没啥损失。-s的损失就有点大了。 - cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -i -o ${TARGET_NAME} && cd - + cd ${BUILD_PACKAGE} && GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-w" -x -v -o ${TARGET_NAME} && cd - fi -TAR_NAME=${TARGET_EXEC_NAME}-${version}-`date "+%Y%m%d-%H%M"`-${PROFILE} +TAR_NAME=${TARGET_EXEC_NAME}-${version}-$(date "+%Y%m%d-%H%M")-${PROFILE} mkdir -p ${TARGET_FOLDER}/${TAR_NAME} @@ -74,4 +74,3 @@ cp -r profiles/${PROFILE}/* ${CONF_DIR} cd ${TARGET_FOLDER} tar czf ${TAR_NAME}.tar.gz ${TAR_NAME}/* -