Remove some logging

This commit is contained in:
Bob Mottram 2017-04-12 17:54:23 +01:00
parent 0b93a11402
commit c8bc36dcb9
1 changed files with 0 additions and 10 deletions

View File

@ -148,12 +148,10 @@ function upgrade_gogs {
if [[ "${CURR_GOGS_VERSION}" == "${GOGS_VERSION}" ]]; then
return
fi
echo "3" > ~/build/testlog.txt
gogs_parameters
echo "gogs binary upgrade: ${GOGS_BIN}"
echo "4" > ~/build/testlog.txt
if [ ! -d ${INSTALL_DIR} ]; then
mkdir -p ${INSTALL_DIR}
fi
@ -162,14 +160,10 @@ function upgrade_gogs {
rm -rf ${INSTALL_DIR}/gogs
fi
GOGS_FILE=linux_${CURR_ARCH}.tar.gz
echo "5" > ~/build/testlog.txt
if [ ! -f ${GOGS_FILE} ]; then
wget ${GOGS_BIN}
echo "6" > ~/build/testlog.txt
fi
echo "7" > ~/build/testlog.txt
if [ ! -f ${GOGS_FILE} ]; then
echo "8" > ~/build/testlog.txt
GOGS_FILE=linux_${CURR_ARCH}.zip
GOGS_BIN="https://github.com/gogits/gogs/releases/download/v${GOGS_VERSION}/${GOGS_FILE}"
if [ ! -f ${GOGS_FILE} ]; then
@ -182,20 +176,16 @@ function upgrade_gogs {
unzip -o ${GOGS_FILE}
fi
else
echo "9" > ~/build/testlog.txt
tar -xzf ${INSTALL_DIR}/${GOGS_FILE}
fi
echo "10" > ~/build/testlog.txt
if [ ! -d ${INSTALL_DIR}/gogs ]; then
exit 37823
fi
echo "11" > ~/build/testlog.txt
rm -rf /home/${GOGS_USERNAME}/*
cp -r ${INSTALL_DIR}/gogs/* /home/${GOGS_USERNAME}
if [ -f ${GOGS_FILE} ]; then
rm ${GOGS_FILE}
fi
echo "12" > ~/build/testlog.txt
sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" ${COMPLETION_FILE}
systemctl restart gogs