Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit fd71a05

Browse files
committed
fix checkout and clean tasks
* for some reason, the git clean task inside the gyp directory was returning an exit status of `1'` even though it was cleaning out files. Just ignore the exit status * chomp the output of the `git-svn` invocation. At least on OSX, it was throwing a specious warning about "-f" not being a valid command, and if the force checkout was actually necessary, it was failing
1 parent b22247d commit fd71a05

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Rakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ task :clean do
7474
sh "rm -rf pkg"
7575
sh "git clean -df"
7676
sh "cd #{V8_Source} && git checkout -f && git clean -dxf"
77-
sh "cd #{GYP_Source} && git checkout -f && git clean -dxf"
77+
if Dir.chdir GYP_Source
78+
sh "git checkout -f"
79+
puts "git clean -dxf"
80+
`git clean -dxf`
81+
end
7882
end
7983

8084
task :devkit do

ext/libv8/checkout.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def checkout!
3131
# --git-dir is needed for older versions of git and git-svn
3232
`git --git-dir=../../.git/modules/vendor/gyp/ svn init #{GYP_SVN} -Ttrunk`
3333
`git config --replace-all svn-remote.svn.fetch trunk:refs/remotes/origin/master`
34-
svn_rev = `git --git-dir=../../.git/modules/vendor/gyp/ svn find-rev r#{rev} | tail -n 1`
34+
svn_rev = `git --git-dir=../../.git/modules/vendor/gyp/ svn find-rev r#{rev} | tail -n 1`.chomp
3535
`git checkout #{svn_rev} -f`
3636
end
3737
end
@@ -43,7 +43,7 @@ def git?(dir)
4343
def check_git_svn!
4444
# msysgit provides git svn
4545
return if RUBY_PLATFORM =~ /mingw/
46-
46+
4747
unless system 'git help svn 2>&1 > /dev/null'
4848
fail "git-svn not installed!\nPlease install git-svn."
4949
end

0 commit comments

Comments
 (0)