소스 검색

Updating gogs

Bob Mottram 9 년 전
부모
커밋
d02837b532
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6
    1
      src/freedombone

+ 6
- 1
src/freedombone 파일 보기

@@ -6113,6 +6113,8 @@ function install_gogs {
6113 6113
       return
6114 6114
   fi
6115 6115
 
6116
+  export GOPATH=/home/git/go
6117
+
6116 6118
   # update to the next commit
6117 6119
   if [ -d /var/www/$GIT_DOMAIN_NAME/htdocs ]; then
6118 6120
       if grep -q "Gogs commit" $COMPLETION_FILE; then
@@ -6125,6 +6127,10 @@ function install_gogs {
6125 6127
               git checkout $GOGS_COMMIT -b $GOGS_COMMIT
6126 6128
               sed -i "s/Gogs commit.*/Gogs commit:$GOGS_COMMIT/g" $COMPLETION_FILE
6127 6129
               chown -R www-data:www-data /var/www/$GIT_DOMAIN_NAME/htdocs
6130
+              cd $GOPATH/src/github.com/gogits/gogs
6131
+              go get -u ./...
6132
+              go build
6133
+              systemctl restart gogs
6128 6134
           fi
6129 6135
       else
6130 6136
           echo "Gogs commit:$GOGS_COMMIT" >> $COMPLETION_FILE
@@ -6147,7 +6153,6 @@ function install_gogs {
6147 6153
       echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
6148 6154
   fi
6149 6155
   . ~/.bashrc
6150
-  export GOPATH=/home/git/go
6151 6156
   if [ ! -d $GOPATH ]; then
6152 6157
       mkdir -p $GOPATH
6153 6158
   fi