Updating gogs
This commit is contained in:
parent
65268030bf
commit
d02837b532
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue