Updating gogs
This commit is contained in:
parent
65268030bf
commit
d02837b532
|
@ -6113,6 +6113,8 @@ function install_gogs {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export GOPATH=/home/git/go
|
||||||
|
|
||||||
# update to the next commit
|
# update to the next commit
|
||||||
if [ -d /var/www/$GIT_DOMAIN_NAME/htdocs ]; then
|
if [ -d /var/www/$GIT_DOMAIN_NAME/htdocs ]; then
|
||||||
if grep -q "Gogs commit" $COMPLETION_FILE; then
|
if grep -q "Gogs commit" $COMPLETION_FILE; then
|
||||||
|
@ -6125,6 +6127,10 @@ function install_gogs {
|
||||||
git checkout $GOGS_COMMIT -b $GOGS_COMMIT
|
git checkout $GOGS_COMMIT -b $GOGS_COMMIT
|
||||||
sed -i "s/Gogs commit.*/Gogs commit:$GOGS_COMMIT/g" $COMPLETION_FILE
|
sed -i "s/Gogs commit.*/Gogs commit:$GOGS_COMMIT/g" $COMPLETION_FILE
|
||||||
chown -R www-data:www-data /var/www/$GIT_DOMAIN_NAME/htdocs
|
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
|
fi
|
||||||
else
|
else
|
||||||
echo "Gogs commit:$GOGS_COMMIT" >> $COMPLETION_FILE
|
echo "Gogs commit:$GOGS_COMMIT" >> $COMPLETION_FILE
|
||||||
|
@ -6147,7 +6153,6 @@ function install_gogs {
|
||||||
echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
|
echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
|
||||||
fi
|
fi
|
||||||
. ~/.bashrc
|
. ~/.bashrc
|
||||||
export GOPATH=/home/git/go
|
|
||||||
if [ ! -d $GOPATH ]; then
|
if [ ! -d $GOPATH ]; then
|
||||||
mkdir -p $GOPATH
|
mkdir -p $GOPATH
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue