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
Léo-Paul Géneau
gitlab-ce
Commits
bd43cf06
Commit
bd43cf06
authored
Dec 12, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use system where only return result is needed.
parent
cd4c65c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
lib/tasks/gitlab/shell.rake
lib/tasks/gitlab/shell.rake
+7
-8
No files found.
lib/tasks/gitlab/shell.rake
View file @
bd43cf06
...
...
@@ -17,17 +17,17 @@ namespace :gitlab do
# Clone if needed
unless
File
.
directory?
(
target_dir
)
Gitlab
::
Popen
.
popen
(
%W(git clone --
#{
args
.
repo
}
#{
target_dir
}
)
)
system
(
%W(git clone --
#{
args
.
repo
}
#{
target_dir
}
)
)
end
# Make sure we're on the right tag
Dir
.
chdir
(
target_dir
)
do
# First try to checkout without fetching
# to avoid stalling tests if the Internet is down.
reset
_status
=
reset_to_commit
(
args
)
reset
ed
=
reset_to_commit
(
args
)
if
reset_status
!=
0
Gitlab
::
Popen
.
popen
(
%W(git fetch origin)
)
unless
reseted
system
(
%W(git fetch origin)
)
reset_to_commit
(
args
)
end
...
...
@@ -58,7 +58,7 @@ namespace :gitlab do
File
.
open
(
"config.yml"
,
"w+"
)
{
|
f
|
f
.
puts
config
.
to_yaml
}
# Launch installation process
Gitlab
::
Popen
.
popen
(
%W(bin/install)
)
system
(
%W(bin/install)
)
end
# Required for debian packaging with PKGR: Setup .ssh/environment with
...
...
@@ -126,13 +126,12 @@ namespace :gitlab do
def
reset_to_commit
(
args
)
tag
,
status
=
Gitlab
::
Popen
.
popen
(
%W(git describe --
#{
args
.
tag
}
)
)
if
status
!=
0
unless
status
.
zero?
tag
,
status
=
Gitlab
::
Popen
.
popen
(
%W(git describe -- origin/
#{
args
.
tag
}
)
)
end
tag
=
tag
.
strip
reset
,
reset_status
=
Gitlab
::
Popen
.
popen
(
%W(git reset --hard
#{
tag
}
)
)
reset_status
system
(
%W(git reset --hard
#{
tag
}
)
)
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