mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Fix download after changes on the github site.
This commit is contained in:
parent
4a802a8b15
commit
4c262a2ad1
@ -63,7 +63,7 @@ class Wat2Wasm {
|
|||||||
throw new IllegalStateException( "Unknown OS: " + os );
|
throw new IllegalStateException( "Unknown OS: " + os );
|
||||||
}
|
}
|
||||||
|
|
||||||
URL url = new URL( "https://github.com/WebAssembly/wabt/releases/latest" );
|
URL url = new URL( "https://api.github.com/repos/WebAssembly/wabt/releases/latest" );
|
||||||
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
|
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
|
||||||
InputStream input = conn.getInputStream();
|
InputStream input = conn.getInputStream();
|
||||||
String data = WasmRule.readStream( input, true );
|
String data = WasmRule.readStream( input, true );
|
||||||
@ -72,7 +72,7 @@ class Wat2Wasm {
|
|||||||
Matcher matcher = pattern.matcher( data );
|
Matcher matcher = pattern.matcher( data );
|
||||||
Assert.assertTrue( data, matcher.find() );
|
Assert.assertTrue( data, matcher.find() );
|
||||||
String downloadUrl = matcher.group();
|
String downloadUrl = matcher.group();
|
||||||
url = new URL( url, downloadUrl );
|
url = new URL( "https://github.com" + downloadUrl );
|
||||||
System.out.println( "\tDownload: " + url );
|
System.out.println( "\tDownload: " + url );
|
||||||
|
|
||||||
conn = (HttpURLConnection)url.openConnection();
|
conn = (HttpURLConnection)url.openConnection();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user