From d188444d7108fdba58b602ada67ef6a205f6cc2d Mon Sep 17 00:00:00 2001 From: 王家文 Date: Mon, 27 May 2024 14:51:19 +0800 Subject: [PATCH] feat✨:配置管理 --- sh/pre/auto.sh | 6 +++++- sh/pre/conf.sh | 7 +++++++ sh/prod/auto.sh | 5 +++++ sh/prod/conf.sh | 7 +++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 sh/pre/conf.sh create mode 100644 sh/prod/conf.sh diff --git a/sh/pre/auto.sh b/sh/pre/auto.sh index 44621b9..f3574de 100644 --- a/sh/pre/auto.sh +++ b/sh/pre/auto.sh @@ -13,13 +13,17 @@ if [ $? -ne 0 ];then exit 3 fi +sh /sh/apigame/conf.sh +if [ $? -ne 0 ];then + exit 4 +fi + binname=apigame sh /sh/apigame/build.sh ${binname} if [ $? -ne 0 ];then exit 1 fi - sleep 1s sh /sh/apigame/apigame.sh ${1} if [ $? -ne 0 ];then diff --git a/sh/pre/conf.sh b/sh/pre/conf.sh new file mode 100644 index 0000000..326c7f8 --- /dev/null +++ b/sh/pre/conf.sh @@ -0,0 +1,7 @@ + # !/bin/bash +scdir=/home/code/go/apigame/src/conf/bytes +descdir=/home/etc/apigame + +cp -r $scdir $descdir + +exit 0 diff --git a/sh/prod/auto.sh b/sh/prod/auto.sh index 6d31bcd..9bad036 100644 --- a/sh/prod/auto.sh +++ b/sh/prod/auto.sh @@ -1,6 +1,11 @@ # !/bin/bash binname=$1 +sh /sh/apigame/conf.sh +if [ $? -ne 0 ];then + exit 4 +fi + sh /sh/apigame/build.sh apigame if [ $? -ne 0 ];then exit 1 diff --git a/sh/prod/conf.sh b/sh/prod/conf.sh new file mode 100644 index 0000000..d29d900 --- /dev/null +++ b/sh/prod/conf.sh @@ -0,0 +1,7 @@ + # !/bin/bash +scdir=/code/go/apigame/src/conf/bytes +descdir=/goexec/exec/apigame + +cp -r $scdir $descdir + +exit 0 -- libgit2 0.21.0