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
64e34cb9
Commit
64e34cb9
authored
Dec 19, 2019
by
nmilojevic1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Gitlab version and revision to export
parent
42d440d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
lib/gitlab/import_export.rb
lib/gitlab/import_export.rb
+8
-0
lib/gitlab/import_export/version_saver.rb
lib/gitlab/import_export/version_saver.rb
+10
-0
No files found.
lib/gitlab/import_export.rb
View file @
64e34cb9
...
@@ -50,6 +50,14 @@ module Gitlab
...
@@ -50,6 +50,14 @@ module Gitlab
'VERSION'
'VERSION'
end
end
def
gitlab_version_filename
'GITLAB_VERSION'
end
def
gitlab_revision_filename
'GITLAB_REVISION'
end
def
export_filename
(
exportable
:)
def
export_filename
(
exportable
:)
basename
=
"
#{
Time
.
now
.
strftime
(
'%Y-%m-%d_%H-%M-%3N'
)
}
_
#{
exportable
.
full_path
.
tr
(
'/'
,
'_'
)
}
"
basename
=
"
#{
Time
.
now
.
strftime
(
'%Y-%m-%d_%H-%M-%3N'
)
}
_
#{
exportable
.
full_path
.
tr
(
'/'
,
'_'
)
}
"
...
...
lib/gitlab/import_export/version_saver.rb
View file @
64e34cb9
...
@@ -13,6 +13,8 @@ module Gitlab
...
@@ -13,6 +13,8 @@ module Gitlab
mkdir_p
(
@shared
.
export_path
)
mkdir_p
(
@shared
.
export_path
)
File
.
write
(
version_file
,
Gitlab
::
ImportExport
.
version
,
mode:
'w'
)
File
.
write
(
version_file
,
Gitlab
::
ImportExport
.
version
,
mode:
'w'
)
File
.
write
(
gitlab_version_file
,
Gitlab
::
VERSION
,
mode:
'w'
)
File
.
write
(
gitlab_revision_file
,
Gitlab
.
revision
,
mode:
'w'
)
rescue
=>
e
rescue
=>
e
@shared
.
error
(
e
)
@shared
.
error
(
e
)
false
false
...
@@ -20,6 +22,14 @@ module Gitlab
...
@@ -20,6 +22,14 @@ module Gitlab
private
private
def
gitlab_version_file
File
.
join
(
@shared
.
export_path
,
Gitlab
::
ImportExport
.
gitlab_version_filename
)
end
def
gitlab_revision_file
File
.
join
(
@shared
.
export_path
,
Gitlab
::
ImportExport
.
gitlab_revision_filename
)
end
def
version_file
def
version_file
File
.
join
(
@shared
.
export_path
,
Gitlab
::
ImportExport
.
version_filename
)
File
.
join
(
@shared
.
export_path
,
Gitlab
::
ImportExport
.
version_filename
)
end
end
...
...
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