From becdfd768b3ca25bf7124359f63e32aa759519a1 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Thu, 12 Jan 2017 04:24:35 +0700 Subject: [PATCH] Update README.md --- README.md | 2 +- publish.gradle | 24 +----------------------- reapi/build.gradle | 2 ++ 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index a11957e..25584b8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Reapi [![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:Reapi_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=Reapi_Publish&guest=1) +# Reapi [![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:Reapi_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=Reapi_Publish&guest=1) [![Download](http://rehlds.ru/version/reapi/)](http://teamcity.rehlds.org/guestAuth/downloadArtifacts.html?buildTypeId=Reapi_Publish&buildId=lastSuccessful) AMX Mod X module, using API regamedll & rehlds diff --git a/publish.gradle b/publish.gradle index 9c02dfb..d8a6d68 100644 --- a/publish.gradle +++ b/publish.gradle @@ -45,29 +45,7 @@ task publishPackage(type: Zip, dependsOn: 'publishPrepareFiles') { from 'publish/publishRoot/reapi' } -Properties repoCreds = new Properties() -project.ext.repoCreds = repoCreds -if (file('repo_creds.properties').exists()) { - println 'Loading credentials' - file('repo_creds.properties').withReader('UTF-8', { Reader r -> - repoCreds.load(r) - }) -} - -task updateVersion { - def http = new HTTPBuilder("http://rehlds.ru/version/update.php?appid=reapi&key=" + repoCreds.getProperty('key') + "&version=" + project.ext.reapiVersionInfo.asMavenVersion(false)); - http.headers = [ "User-Agent": "Mozilla/5.0" ]; - http.request(POST) { - response.success = { resp -> - println "Version version success! Status: ${resp.status}" - } - response.failure = { resp -> - println "Request failed with status ${resp.status}" - } - } -} - task doPackage { - dependsOn 'publishPackage', 'updateVersion' + dependsOn 'publishPackage' } diff --git a/reapi/build.gradle b/reapi/build.gradle index 756738e..1ff2caa 100644 --- a/reapi/build.gradle +++ b/reapi/build.gradle @@ -173,6 +173,8 @@ task generateAppVersion { outputs.file versionFile outputs.file versionFileInc + println "##teamcity[buildNumber '" + verInfo.asMavenVersion(false) + "']"; + doLast { def templateCtx = [ verInfo : verInfo