Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
e8df1c07
Commit
e8df1c07
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Peg gogs to a particular commit
parent
79c26dcf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone
+32
-18
32 additions, 18 deletions
src/freedombone
with
32 additions
and
18 deletions
src/freedombone
+
32
−
18
View file @
e8df1c07
...
...
@@ -167,6 +167,7 @@ GIT_DOMAIN_NAME=
GIT_CODE=
GIT_DOMAIN_REPO="https://github.com/gogits/gogs.git"
GIT_ADMIN_PASSWORD=
GOGS_COMMIT='2f28a0310b0f391dd74bb3a2ab0ae06379a4fb1a'
# Domain name for Owncloud installation
OWNCLOUD_DOMAIN_NAME=
...
...
@@ -805,6 +806,9 @@ function read_configuration {
if grep -q "FULLBLOG_COMMIT" $CONFIGURATION_FILE; then
FULLBLOG_COMMIT=$(grep "FULLBLOG_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GOGS_COMMIT" $CONFIGURATION_FILE; then
GOGS_COMMIT=$(grep "GOGS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "HUBZILLA_COMMIT" $CONFIGURATION_FILE; then
HUBZILLA_COMMIT=$(grep "HUBZILLA_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
...
...
@@ -8774,12 +8778,31 @@ function install_gogs {
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return
fi
if
grep -Fxq "install_gogs" $COMPLETION_FILE
; then
if
[ ! $GIT_DOMAIN_NAME ]
; then
return
fi
if [ ! $GIT_DOMAIN_NAME ]; then
# update to the next commit
if [ -d /var/www/$GIT_DOMAIN_NAME/htdocs ]; then
if grep -q "Gogs commit" $COMPLETION_FILE; then
CURRENT_GOGS_COMMIT=$(grep "Gogs commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
if [[ "$CURRENT_GOGS_COMMIT" != "$GOGS_COMMIT" ]]; then
cd /var/www/$GIT_DOMAIN_NAME/htdocs
git stash
git checkout master
git pull
git checkout $GOGS_COMMIT
git branch -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
fi
fi
fi
if grep -Fxq "install_gogs" $COMPLETION_FILE; then
return
fi
# http://gogs.io/docs/installation/install_from_source.md
# add a gogs user account
...
...
@@ -8808,6 +8831,13 @@ function install_gogs {
cd $GOPATH/src/github.com/gogits
git clone $GIT_DOMAIN_REPO
cd gogs
git checkout $GOGS_COMMIT
git branch -b $GOGS_COMMIT
if ! grep -q "Gogs commit" $COMPLETION_FILE; then
echo "Gogs commit:$GOGS_COMMIT" >> $COMPLETION_FILE
else
sed -i "s/Gogs commit.*/Gogs commit:$GOGS_COMMIT/g" $COMPLETION_FILE
fi
# install
go get -u ./...
...
...
@@ -10856,22 +10886,6 @@ function create_upgrade_script {
echo ' git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'fi' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo "if grep -Fxq \"install_gogs\" $COMPLETION_FILE; then" >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' # gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo " mv /home/git/gogs-repositories/*.git /home/git/gogs-repositories/$MY_USERNAME" >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' cd /home/git/go/src/github.com/gogits/gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' git stash' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' chown -R git:git /home/git' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' chmod 600 /home/git/go/src/github.com/gogits/gogs/custom/conf/app.ini' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' export GOPATH=/home/git/go' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' go get -u ./...' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' go build' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' systemctl restart gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' systemctl daemon-reload' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'fi' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo "if grep -Fxq \"install_ipfs\" $COMPLETION_FILE; then" >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' # ipfs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo ' chown -R git:git /home/git' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment