mirror of
https://github.com/processing/processing4.git
synced 2026-01-30 11:51:54 +01:00
Move contribution url into centralised place
Using the work by @mingness to simplify the contributions workflow. Disabled the post request because that data is not saved anywhere and most hosts do not support it
This commit is contained in:
@@ -17,6 +17,7 @@ group = rootProject.group
|
||||
tasks.withType<JavaExec> {
|
||||
systemProperty("processing.version", version)
|
||||
systemProperty("processing.revision", "1296")
|
||||
systemProperty("processing.contributions.source", "https://contributions-preview.processing.org/contribs.txt")
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ContributionListing {
|
||||
* Stable URL that will redirect to wherever the file is hosted.
|
||||
* Changed to use https in 4.0 beta 8 (returns same data).
|
||||
*/
|
||||
static final String LISTING_URL = "https://download.processing.org/contribs";
|
||||
static final String LISTING_URL = System.getProperty("processing.contributions.source","https://download.processing.org/contribs");
|
||||
static final String LOCAL_FILENAME = "contribs.txt";
|
||||
|
||||
/** Location of the listing file on disk, will be read and written. */
|
||||
|
||||
@@ -67,10 +67,10 @@ public class ContributionManager {
|
||||
conn.setConnectTimeout(15 * 1000);
|
||||
conn.setReadTimeout(60 * 1000);
|
||||
|
||||
if (post == null) {
|
||||
// Disable the post for now, since it's not used
|
||||
if (post == null || System.getProperty("processing.contributions.source") != null) {
|
||||
conn.setRequestMethod("GET");
|
||||
conn.connect();
|
||||
|
||||
} else {
|
||||
post = Util.gzipEncode(post);
|
||||
conn.setRequestMethod("POST");
|
||||
|
||||
Reference in New Issue
Block a user