We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 215e077 commit 9c6df52Copy full SHA for 9c6df52
lib/ruby_wasm/build_system/product/ruby_source.rb
@@ -23,11 +23,12 @@ def configure_file
23
def fetch
24
case @params[:type]
25
when "github"
26
- tarball_url =
27
- "https://api.github.com/repos/#{@params[:repo]}/tarball/#{@params[:rev]}"
+ repo_url = "https://github.com/#{@params[:repo]}.git"
28
mkdir_p src_dir
29
- sh "curl -L #{tarball_url} | tar xz --strip-components=1",
30
- chdir: src_dir
+ sh "git init", chdir: src_dir
+ sh "git remote add origin #{repo_url}", chdir: src_dir
+ sh "git fetch --depth 1 origin #{@params[:rev]}", chdir: src_dir
31
+ sh "git checkout #{@params[:rev]}", chdir: src_dir
32
else
33
raise "unknown source type: #{@params[:type]}"
34
end
0 commit comments