Updating gogs

This commit is contained in:
Bob Mottram 2015-12-15 10:23:46 +00:00
parent 65268030bf
commit d02837b532
1 changed files with 6 additions and 1 deletions

View File

@ -6113,6 +6113,8 @@ function install_gogs {
return
fi
export GOPATH=/home/git/go
# update to the next commit
if [ -d /var/www/$GIT_DOMAIN_NAME/htdocs ]; then
if grep -q "Gogs commit" $COMPLETION_FILE; then
@ -6125,6 +6127,10 @@ function install_gogs {
git checkout $GOGS_COMMIT -b $GOGS_COMMIT
sed -i "s/Gogs commit.*/Gogs commit:$GOGS_COMMIT/g" $COMPLETION_FILE
chown -R www-data:www-data /var/www/$GIT_DOMAIN_NAME/htdocs
cd $GOPATH/src/github.com/gogits/gogs
go get -u ./...
go build
systemctl restart gogs
fi
else
echo "Gogs commit:$GOGS_COMMIT" >> $COMPLETION_FILE
@ -6147,7 +6153,6 @@ function install_gogs {
echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
fi
. ~/.bashrc
export GOPATH=/home/git/go
if [ ! -d $GOPATH ]; then
mkdir -p $GOPATH
fi