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
f36db59d
Commit
f36db59d
authored
Nov 05, 2014
by
Ciro Santilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor GITLAB_SHELL_VERSION get method
parent
f9814bf2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
lib/gitlab/backend/shell.rb
lib/gitlab/backend/shell.rb
+7
-0
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+3
-7
lib/tasks/gitlab/shell.rake
lib/tasks/gitlab/shell.rake
+1
-1
No files found.
lib/gitlab/backend/shell.rb
View file @
f36db59d
...
...
@@ -8,6 +8,13 @@ module Gitlab
end
end
class
<<
self
def
version_required
@version_required
||=
File
.
read
(
Rails
.
root
.
join
(
'GITLAB_SHELL_VERSION'
)).
strip
end
end
# Init new repository
#
# name - project path with namespace
...
...
lib/tasks/gitlab/check.rake
View file @
f36db59d
...
...
@@ -574,20 +574,16 @@ namespace :gitlab do
Gitlab
::
Shell
.
new
.
version
end
def
required_gitlab_shell_version
File
.
read
(
File
.
join
(
Rails
.
root
,
"GITLAB_SHELL_VERSION"
)).
strip
end
def
gitlab_shell_major_version
required_gitlab_shell_version
.
split
(
"."
)[
0
].
to_i
Gitlab
::
Shell
.
version_required
.
split
(
'.'
)[
0
].
to_i
end
def
gitlab_shell_minor_version
required_gitlab_shell_version
.
split
(
"."
)[
1
].
to_i
Gitlab
::
Shell
.
version_required
.
split
(
'.'
)[
1
].
to_i
end
def
gitlab_shell_patch_version
required_gitlab_shell_version
.
split
(
"."
)[
2
].
to_i
Gitlab
::
Shell
.
version_required
.
split
(
'.'
)[
2
].
to_i
end
def
has_gitlab_shell3?
...
...
lib/tasks/gitlab/shell.rake
View file @
f36db59d
...
...
@@ -4,7 +4,7 @@ namespace :gitlab do
task
:install
,
[
:tag
,
:repo
]
=>
:environment
do
|
t
,
args
|
warn_user_is_not_gitlab
default_version
=
File
.
read
(
File
.
join
(
Rails
.
root
,
"GITLAB_SHELL_VERSION"
)).
strip
default_version
=
Gitlab
::
Shell
.
version_required
args
.
with_defaults
(
tag:
'v'
+
default_version
,
repo:
"https://gitlab.com/gitlab-org/gitlab-shell.git"
)
user
=
Gitlab
.
config
.
gitlab
.
user
...
...
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