File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/ruby_wasm/build_system/product Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,13 @@ def fetch
35
35
case @params [ :type ]
36
36
when "github"
37
37
repo_url = "https://github.com/#{ @params [ :repo ] } .git"
38
- system "git clone --depth 1 -b #{ @params [ :rev ] } #{ repo_url } #{ src_dir } " or
38
+ FileUtils . mkdir_p src_dir
39
+ system "git init" , chdir : src_dir
40
+ system "git remote add origin #{ repo_url } " , chdir : src_dir
41
+ system ( "git fetch --depth 1 origin #{ @params [ :rev ] } :#{ @params [ :rev ] } " , chdir : src_dir ) or
39
42
raise "failed to clone #{ repo_url } "
43
+ system ( "git checkout #{ @params [ :rev ] } " , chdir : src_dir ) or
44
+ raise "failed to checkout #{ @params [ :rev ] } "
40
45
when "local"
41
46
FileUtils . mkdir_p File . dirname ( src_dir )
42
47
FileUtils . cp_r @params [ :src ] , src_dir
You can’t perform that action at this time.
0 commit comments