From d02837b532096a1ee4e04cff9d1884e50715f588 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 15 Dec 2015 10:23:46 +0000 Subject: [PATCH] Updating gogs --- src/freedombone | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedombone b/src/freedombone index 2845b1a0..4d6ca955 100755 --- a/src/freedombone +++ b/src/freedombone @@ -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