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
581f4663
Commit
581f4663
authored
Dec 23, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix upgrader
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
1f43fa20
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/upgrader.rb
lib/gitlab/upgrader.rb
+3
-3
spec/lib/gitlab/upgrader_spec.rb
spec/lib/gitlab/upgrader_spec.rb
+2
-2
No files found.
lib/gitlab/upgrader.rb
View file @
581f4663
...
@@ -43,15 +43,15 @@ module Gitlab
...
@@ -43,15 +43,15 @@ module Gitlab
def
latest_version_raw
def
latest_version_raw
git_tags
=
`git ls-remote --tags origin | grep tags
\/
v
#{
current_version
.
major
}
`
git_tags
=
`git ls-remote --tags origin | grep tags
\/
v
#{
current_version
.
major
}
`
git_tags
=
git_tags
.
lines
.
to_a
.
select
{
|
version
|
version
=~
/v\d\.\d\.\d\Z/
}
git_tags
=
git_tags
.
lines
.
to_a
.
select
{
|
version
|
version
=~
/v\d\.\d\.\d
-ee
\Z/
}
last_tag
=
git_tags
.
last
.
match
(
/v\d\.\d\.\d/
).
to_s
last_tag
=
git_tags
.
last
.
match
(
/v\d\.\d\.\d
-ee
/
).
to_s
end
end
def
update_commands
def
update_commands
{
{
"Stash changed files"
=>
"git stash"
,
"Stash changed files"
=>
"git stash"
,
"Get latest code"
=>
"git fetch"
,
"Get latest code"
=>
"git fetch"
,
"Switch to new version"
=>
"git checkout -b v
#{
latest_version
}
"
,
"Switch to new version"
=>
"git checkout -b v
#{
latest_version
}
-ee
"
,
"Install gems"
=>
"bundle"
,
"Install gems"
=>
"bundle"
,
"Migrate DB"
=>
"bundle exec rake db:migrate RAILS_ENV=production"
,
"Migrate DB"
=>
"bundle exec rake db:migrate RAILS_ENV=production"
,
"Recompile assets"
=>
"bundle exec rake assets:clean assets:precompile RAILS_ENV=production"
,
"Recompile assets"
=>
"bundle exec rake assets:clean assets:precompile RAILS_ENV=production"
,
...
...
spec/lib/gitlab/upgrader_spec.rb
View file @
581f4663
...
@@ -17,8 +17,8 @@ describe Gitlab::Upgrader do
...
@@ -17,8 +17,8 @@ describe Gitlab::Upgrader do
describe
'latest_version_raw'
do
describe
'latest_version_raw'
do
it
'should be latest version for GitLab 5'
do
it
'should be latest version for GitLab 5'
do
upgrader
.
stub
(
current_version_raw:
"
5.3.0
"
)
upgrader
.
stub
(
current_version_raw:
"
6.3.0-ee
"
)
upgrader
.
latest_version_raw
.
should
==
"v5.4.2"
upgrader
.
latest_version_raw
.
should
match
(
/v6\.\d\.\d-ee/
)
end
end
end
end
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