Fetch modules from the correct CI

This commit is contained in:
Jamie Mansfield 2016-07-03 21:28:40 +01:00
parent 1cf5557c48
commit d9420aa63b
No known key found for this signature in database
GPG Key ID: 27F6918C0D47DF94
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
From 248f19f83a821f87e64714766803284e73187be8 Mon Sep 17 00:00:00 2001
From 2b3864af48ff9c7a5bea57ea40e2f8a8ebe3336a Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Thu, 19 May 2016 11:34:52 -0700
Subject: [PATCH] Fetch modules from the Waterfall CI
@ -6,7 +6,7 @@ Subject: [PATCH] Fetch modules from the Waterfall CI
Don't fetch from the BungeeCord CI, as that only has their modules
diff --git a/proxy/src/main/java/net/md_5/bungee/module/JenkinsModuleSource.java b/proxy/src/main/java/net/md_5/bungee/module/JenkinsModuleSource.java
index 9bd2dc9..97a08da 100644
index 9bd2dc9..fa14161 100644
--- a/proxy/src/main/java/net/md_5/bungee/module/JenkinsModuleSource.java
+++ b/proxy/src/main/java/net/md_5/bungee/module/JenkinsModuleSource.java
@@ -1,10 +1,11 @@
@ -28,18 +28,18 @@ index 9bd2dc9..97a08da 100644
try
{
- URL website = new URL( "http://ci.md-5.net/job/BungeeCord/" + version.getBuild() + "/artifact/module/" + module.getName().replace( '_', '-' ) + "/target/" + module.getName() + ".jar" );
+ URL website = new URL( "https://tc.demonwav.com/guestAuth/repository/download/Waterfall_Build/" + version.getBuild() + "/" + module.getName() + ".jar" );
+ URL website = new URL( "https://ci.aquifermc.org/" + version.getBuild() + "/artifact/module/" + module.getName().replace( '_', '-' ) + "/target/" + module.getName() + ".jar" );
URLConnection con = website.openConnection();
// 15 second timeout at various stages
con.setConnectTimeout( 15000 );
con.setReadTimeout( 15000 );
+ con.setRequestProperty("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36");
+ con.setRequestProperty( "User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36" );
- Files.write( ByteStreams.toByteArray( con.getInputStream() ), module.getFile() );
+ Files.copy(con.getInputStream(), module.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
+ Files.copy( con.getInputStream(), module.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING );
System.out.println( "Download complete" );
} catch ( IOException ex )
{
--
2.8.3
2.8.2

View File

@ -1,4 +1,4 @@
From 22251b09127f2cebcb6853666cf391f6c07641dd Mon Sep 17 00:00:00 2001
From d9dc3e5bcd370b01545288c9820dc0b57e329e03 Mon Sep 17 00:00:00 2001
From: Ichbinjoe <joe@ibj.io>
Date: Sun, 3 Jul 2016 03:54:14 -0400
Subject: [PATCH] Add timeout variant to connect methods Also added more
@ -85,5 +85,5 @@ index ff103bf..47b37c0 100644
// Windows is bugged, multi homed users will just have to live with random connecting IPs
if ( getPendingConnection().getListener().isSetLocalAddress() && !PlatformDependent.isWindows() )
--
2.7.4 (Apple Git-66)
2.8.2