Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
aded7056
Commit
aded7056
authored
Aug 28, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1313 from LeonB/master
Fixed some hardcoded paths based on issue #1272
parents
aa708ed9
ffdda12f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
3 deletions
+8
-3
config/gitlab.yml.example
config/gitlab.yml.example
+1
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+4
-0
lib/tasks/gitlab/backup.rake
lib/tasks/gitlab/backup.rake
+1
-1
lib/tasks/gitlab/status.rake
lib/tasks/gitlab/status.rake
+1
-1
lib/tasks/gitlab/write_hook.rake
lib/tasks/gitlab/write_hook.rake
+1
-1
No files found.
config/gitlab.yml.example
View file @
aded7056
...
@@ -33,6 +33,7 @@ app:
...
@@ -33,6 +33,7 @@ app:
git_host:
git_host:
admin_uri: git@localhost:gitolite-admin
admin_uri: git@localhost:gitolite-admin
base_path: /home/git/repositories/
base_path: /home/git/repositories/
# hooks_path: /var/lib/gitolite/.gitolite/hooks/ # only needed when gitolite is not installed according the manual
# host: localhost
# host: localhost
git_user: git
git_user: git
upload_pack: true
upload_pack: true
...
...
config/initializers/1_settings.rb
View file @
aded7056
...
@@ -66,6 +66,10 @@ class Settings < Settingslogic
...
@@ -66,6 +66,10 @@ class Settings < Settingslogic
git_host
[
'base_path'
]
||
'/home/git/repositories/'
git_host
[
'base_path'
]
||
'/home/git/repositories/'
end
end
def
git_hooks_path
git_host
[
'hooks_path'
]
||
'/home/git/share/gitolite/hooks/'
end
def
git_upload_pack
def
git_upload_pack
if
git_host
[
'upload_pack'
]
!=
false
if
git_host
[
'upload_pack'
]
!=
false
true
true
...
...
lib/tasks/gitlab/backup.rake
View file @
aded7056
...
@@ -144,7 +144,7 @@ namespace :gitlab do
...
@@ -144,7 +144,7 @@ namespace :gitlab do
if
Kernel
.
system
(
"cd
#{
File
.
dirname
(
project
.
second
)
}
> /dev/null 2>&1 && git clone --bare
#{
backup_path_repo
}
/
#{
project
.
first
}
.bundle
#{
project
.
first
}
.git > /dev/null 2>&1"
)
if
Kernel
.
system
(
"cd
#{
File
.
dirname
(
project
.
second
)
}
> /dev/null 2>&1 && git clone --bare
#{
backup_path_repo
}
/
#{
project
.
first
}
.bundle
#{
project
.
first
}
.git > /dev/null 2>&1"
)
permission_commands
=
[
permission_commands
=
[
"sudo chmod -R g+rwX
#{
Gitlab
.
config
.
git_base_path
}
"
,
"sudo chmod -R g+rwX
#{
Gitlab
.
config
.
git_base_path
}
"
,
"sudo chown -R
#{
Gitlab
.
config
.
ssh_user
}
:
#{
Gitlab
.
config
.
ssh_user
}
#{
Gitlab
.
config
.
git_base_path
}
"
,
"sudo chown -R
#{
Gitlab
.
config
.
ssh_user
}
:
#{
Gitlab
.
config
.
ssh_user
}
#{
Gitlab
.
config
.
git_base_path
}
"
]
]
permission_commands
.
each
{
|
command
|
Kernel
.
system
(
command
)
}
permission_commands
.
each
{
|
command
|
Kernel
.
system
(
command
)
}
puts
"[DONE]"
.
green
puts
"[DONE]"
.
green
...
...
lib/tasks/gitlab/status.rake
View file @
aded7056
...
@@ -56,7 +56,7 @@ namespace :gitlab do
...
@@ -56,7 +56,7 @@ namespace :gitlab do
return
return
end
end
gitolite_hooks_path
=
File
.
join
(
"/home"
,
Gitlab
.
config
.
ssh_user
,
"share"
,
"gitolite"
,
"hooks"
,
"common"
)
gitolite_hooks_path
=
File
.
join
(
Gitlab
.
config
.
git_hooks_path
,
"common"
)
gitlab_hook_files
=
[
'post-receive'
]
gitlab_hook_files
=
[
'post-receive'
]
gitlab_hook_files
.
each
do
|
file_name
|
gitlab_hook_files
.
each
do
|
file_name
|
dest
=
File
.
join
(
gitolite_hooks_path
,
file_name
)
dest
=
File
.
join
(
gitolite_hooks_path
,
file_name
)
...
...
lib/tasks/gitlab/write_hook.rake
View file @
aded7056
...
@@ -2,7 +2,7 @@ namespace :gitlab do
...
@@ -2,7 +2,7 @@ namespace :gitlab do
namespace
:gitolite
do
namespace
:gitolite
do
desc
"GITLAB | Write GITLAB hook for gitolite"
desc
"GITLAB | Write GITLAB hook for gitolite"
task
:write_hooks
=>
:environment
do
task
:write_hooks
=>
:environment
do
gitolite_hooks_path
=
File
.
join
(
"/home"
,
Gitlab
.
config
.
ssh_user
,
"share"
,
"gitolite"
,
"hooks"
,
"common"
)
gitolite_hooks_path
=
File
.
join
(
Gitlab
.
config
.
git_hooks_path
,
"common"
)
gitlab_hooks_path
=
Rails
.
root
.
join
(
"lib"
,
"hooks"
)
gitlab_hooks_path
=
Rails
.
root
.
join
(
"lib"
,
"hooks"
)
gitlab_hook_files
=
[
'post-receive'
]
gitlab_hook_files
=
[
'post-receive'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment