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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
9d7e7327
Commit
9d7e7327
authored
Jun 19, 2018
by
Ahmad Hassan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move backup custom hooks up a level
parent
5308b51e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
lib/backup/repository.rb
lib/backup/repository.rb
+2
-4
No files found.
lib/backup/repository.rb
View file @
9d7e7327
...
@@ -55,6 +55,8 @@ module Backup
...
@@ -55,6 +55,8 @@ module Backup
backup_project_local
(
project
)
backup_project_local
(
project
)
end
end
end
end
backup_custom_hooks
(
project
)
rescue
=>
e
rescue
=>
e
progress_warn
(
project
,
e
,
'Failed to backup repo'
)
progress_warn
(
project
,
e
,
'Failed to backup repo'
)
end
end
...
@@ -63,8 +65,6 @@ module Backup
...
@@ -63,8 +65,6 @@ module Backup
path_to_project_bundle
=
path_to_bundle
(
project
)
path_to_project_bundle
=
path_to_bundle
(
project
)
Gitlab
::
GitalyClient
::
RepositoryService
.
new
(
project
.
repository
)
Gitlab
::
GitalyClient
::
RepositoryService
.
new
(
project
.
repository
)
.
create_bundle
(
path_to_project_bundle
)
.
create_bundle
(
path_to_project_bundle
)
backup_custom_hooks
(
project
)
end
end
def
backup_project_local
(
project
)
def
backup_project_local
(
project
)
...
@@ -74,8 +74,6 @@ module Backup
...
@@ -74,8 +74,6 @@ module Backup
path_to_project_bundle
=
path_to_bundle
(
project
)
path_to_project_bundle
=
path_to_bundle
(
project
)
backup_custom_hooks
(
project
)
cmd
=
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
--git-dir=
#{
path_to_project_repo
}
bundle create
#{
path_to_project_bundle
}
--all)
cmd
=
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
--git-dir=
#{
path_to_project_repo
}
bundle create
#{
path_to_project_bundle
}
--all)
output
,
status
=
Gitlab
::
Popen
.
popen
(
cmd
)
output
,
status
=
Gitlab
::
Popen
.
popen
(
cmd
)
progress_warn
(
project
,
cmd
.
join
(
' '
),
output
)
unless
status
.
zero?
progress_warn
(
project
,
cmd
.
join
(
' '
),
output
)
unless
status
.
zero?
...
...
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