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
Jérome Perrin
gitlab-ce
Commits
059f3a34
Commit
059f3a34
authored
Jul 23, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check ruby version to be >= 2.0.0
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
68a9203b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+18
-0
No files found.
lib/tasks/gitlab/check.rake
View file @
059f3a34
...
...
@@ -27,6 +27,7 @@ namespace :gitlab do
check_projects_have_namespace
check_satellites_exist
check_redis_version
check_ruby_version
check_git_version
finished_checking
"GitLab"
...
...
@@ -816,6 +817,23 @@ namespace :gitlab do
end
end
def
check_ruby_version
required_version
=
Gitlab
::
VersionInfo
.
new
(
2
,
0
,
0
)
current_version
=
Gitlab
::
VersionInfo
.
parse
(
run
(
%W(ruby --version)
))
print
"Ruby version >=
#{
required_version
}
? ... "
if
current_version
.
valid?
&&
required_version
<=
current_version
puts
"yes (
#{
current_version
}
)"
.
green
else
puts
"no"
.
red
try_fixing_it
(
"Update your ruby to a version >=
#{
required_version
}
from
#{
current_version
}
"
)
fix_and_rerun
end
end
def
check_git_version
required_version
=
Gitlab
::
VersionInfo
.
new
(
1
,
7
,
10
)
current_version
=
Gitlab
::
VersionInfo
.
parse
(
run
(
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
--version)
))
...
...
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