Change the folder structure.
This commit is contained in:
parent
deaeb39618
commit
1f01b89c4c
@ -62,6 +62,9 @@ copy %GOPATH%\bin\tank.exe %distPath%
|
|||||||
echo copying build
|
echo copying build
|
||||||
xcopy %GOPATH%\src\tank\build %distPath% /e/h
|
xcopy %GOPATH%\src\tank\build %distPath% /e/h
|
||||||
|
|
||||||
|
echo "remove pack"
|
||||||
|
rmdir /s/q %distPath%\pack
|
||||||
|
|
||||||
cd %PRE_DIR%
|
cd %PRE_DIR%
|
||||||
|
|
||||||
echo check the dist file in %distPath%
|
echo check the dist file in %distPath%
|
3
build/script/build.sh → build/pack/build.sh
Executable file → Normal file
3
build/script/build.sh → build/pack/build.sh
Executable file → Normal file
@ -56,6 +56,9 @@ cp "$GOPATH/bin/tank" $distPath
|
|||||||
echo "copying build"
|
echo "copying build"
|
||||||
cp -r "$GOPATH/src/tank/build/." $distPath
|
cp -r "$GOPATH/src/tank/build/." $distPath
|
||||||
|
|
||||||
|
echo "remove pack"
|
||||||
|
rm -rf $distPath/pack
|
||||||
|
|
||||||
cd $PRE_DIR
|
cd $PRE_DIR
|
||||||
|
|
||||||
echo "check the dist file in $distPath"
|
echo "check the dist file in $distPath"
|
@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# executable path
|
|
||||||
EXE_PATH=$GOPATH/bin/tank
|
|
||||||
|
|
||||||
# execute arguments
|
|
||||||
MysqlHost=127.0.0.1
|
|
||||||
MysqlPort=3306
|
|
||||||
MysqlSchema=tank
|
|
||||||
MysqlUserName=tank
|
|
||||||
MysqlPassword=Tank_123
|
|
||||||
|
|
||||||
AdminUsername=admin
|
|
||||||
AdminEmail=lish516@126.com
|
|
||||||
AdminPassword=123456
|
|
||||||
|
|
||||||
if [ -f "$EXE_PATH" ]; then
|
|
||||||
nohup $EXE_PATH -MysqlHost=$MysqlHost -MysqlPort=$MysqlPort -MysqlSchema=$MysqlSchema -MysqlUserName=$MysqlUserName -MysqlPassword=$MysqlPassword -AdminUsername=$AdminUsername -AdminEmail=$AdminEmail -AdminPassword=$AdminPassword >/dev/null 2>&1 &
|
|
||||||
else
|
|
||||||
echo 'Cannot find $EXE_PATH.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
homePath=$GOPATH/src/tank
|
|
||||||
|
|
||||||
oldPath=$(pwd)
|
|
||||||
|
|
||||||
echo "cd homePath"
|
|
||||||
cd $homePath
|
|
||||||
|
|
||||||
echo "shutdown tank"
|
|
||||||
source $homePath/build/script/shutdown.sh
|
|
||||||
|
|
||||||
echo "git reset"
|
|
||||||
git reset --hard HEAD
|
|
||||||
|
|
||||||
echo "git pull"
|
|
||||||
git pull
|
|
||||||
|
|
||||||
echo "go install tank"
|
|
||||||
go install tank
|
|
||||||
|
|
||||||
cd $oldPath
|
|
||||||
|
|
||||||
echo "startup tank"
|
|
||||||
source $homePath/doc/script/startup.sh
|
|
||||||
|
|
||||||
|
|
14
build/service/shutdown.sh
Normal file
14
build/service/shutdown.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
EXE_PATH=$DIR/tank
|
||||||
|
|
||||||
|
EDASPID=`ps -ef | grep "$EXE_PATH"|grep -v grep |head -n 1 | awk '{print $2}'`
|
||||||
|
if [ -z $EDASPID ];
|
||||||
|
then
|
||||||
|
echo "Cannot find $EXE_PATH."
|
||||||
|
else
|
||||||
|
kill -9 $EDASPID
|
||||||
|
echo $EXE_PATH
|
||||||
|
echo 'Shutdown successfully.'
|
||||||
|
fi
|
12
build/service/startup.sh
Normal file
12
build/service/startup.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# executable path
|
||||||
|
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
EXE_PATH=$DIR/tank
|
||||||
|
|
||||||
|
if [ -f "$EXE_PATH" ]; then
|
||||||
|
nohup $EXE_PATH >/dev/null 2>&1 &
|
||||||
|
else
|
||||||
|
echo 'Cannot find $EXE_PATH.'
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user