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