Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 21EA62009F3 for ; Thu, 5 May 2016 22:50:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 20789160A09; Thu, 5 May 2016 20:50:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4643F160A04 for ; Thu, 5 May 2016 22:50:21 +0200 (CEST) Received: (qmail 89328 invoked by uid 500); 5 May 2016 20:50:20 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 89315 invoked by uid 99); 5 May 2016 20:50:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2016 20:50:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1083AC0ECE for ; Thu, 5 May 2016 20:50:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ZbGKmS72yoUm for ; Thu, 5 May 2016 20:50:18 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 7F8CC5F574 for ; Thu, 5 May 2016 20:50:17 +0000 (UTC) Received: (qmail 89078 invoked by uid 99); 5 May 2016 20:50:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2016 20:50:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 19131DFE61; Thu, 5 May 2016 20:50:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: klund@apache.org To: commits@geode.incubator.apache.org Date: Thu, 05 May 2016 20:50:17 -0000 Message-Id: In-Reply-To: <7600f4b7e6834462a523c65f75f3b182@git.apache.org> References: <7600f4b7e6834462a523c65f75f3b182@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/11] incubator-geode git commit: Revert "GEODE-1260: Cache SCM metadata for source distributions" archived-at: Thu, 05 May 2016 20:50:22 -0000 Revert "GEODE-1260: Cache SCM metadata for source distributions" This reverts commit 19b9fe5ad6b4a697c512304f3db92c91a02f4072. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fc38555c Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fc38555c Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fc38555c Branch: refs/heads/feature/GEODE-1276 Commit: fc38555c9b1094d915e8acb94348ab2dcc07450c Parents: 19b9fe5 Author: Anthony Baker Authored: Wed May 4 06:46:35 2016 -0700 Committer: Anthony Baker Committed: Wed May 4 06:46:35 2016 -0700 ---------------------------------------------------------------------- geode-assembly/build.gradle | 12 ------- geode-core/build.gradle | 69 +++++++++++++++++----------------------- gradle/rat.gradle | 1 - 3 files changed, 30 insertions(+), 52 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc38555c/geode-assembly/build.gradle ---------------------------------------------------------------------- diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle index ed5154e..e786b24 100755 --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -227,17 +227,6 @@ task docs(type: Javadoc) { } } -task writeBuildInfo { - def buildInfo = file "$buildDir/.buildinfo" - outputs.file buildInfo - doLast { - buildInfo.getParentFile().mkdirs(); - new FileOutputStream(buildInfo).withStream { fos -> - project(':geode-core').readScmInfo().store(fos, '') - } - } -} - gradle.taskGraph.whenReady( { graph -> tasks.withType(AbstractArchiveTask).findAll { it.name.toLowerCase().contains("dist") @@ -253,7 +242,6 @@ distributions { src { baseName = 'apache-geode-src' contents { - from writeBuildInfo from (rootDir) { exclude 'KEYS' exclude 'gradlew' http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc38555c/geode-core/build.gradle ---------------------------------------------------------------------- diff --git a/geode-core/build.gradle b/geode-core/build.gradle index a0bc46a..45051dc 100755 --- a/geode-core/build.gradle +++ b/geode-core/build.gradle @@ -131,40 +131,7 @@ sourceSets { output.dir(generatedResources, builtBy: 'createVersionPropertiesFile') } } - -ext.readScmInfo = { - try { - def git = org.ajoberstar.grgit.Grgit.open(currentDir: projectDir) - try { - return [ - 'Source-Repository': git.branch.getCurrent().name, - 'Source-Revision' : git.head().id, - 'Source-Date' : git.head().getDate().format('yyyy-MM-dd HH:mm:ss Z') - ] as Properties - } finally { - git.close() - } - } catch (IllegalArgumentException e) { - // if we're building from the source distribution, we don't have git so - // use cached info written during the assembly process - def buildInfo = file "$rootDir/.buildinfo" - if (buildInfo.exists()) { - def props = new Properties() - new FileInputStream(buildInfo).withStream { fis -> - props.load(fis) - } - return props - } - - logger.warn( '***** Unable to find Git workspace. Using default version information *****' ) - return [ - 'Source-Repository': 'UNKNOWN', - 'Source-Revision' : 'UNKNOWN', - 'Source-Date' : new Date().format('yyyy-MM-dd HH:mm:ss Z') - ] as Properties - } -} - + // Creates the version properties file and writes it to the classes dir task createVersionPropertiesFile { def propertiesFile = file(generatedResources + "/com/gemstone/gemfire/internal/GemFireVersion.properties"); @@ -172,18 +139,42 @@ task createVersionPropertiesFile { inputs.dir compileJava.destinationDir doLast { + + try { + def grgit = org.ajoberstar.grgit.Grgit.open(currentDir: projectDir) + ext.branch = grgit.branch.getCurrent().name + ext.commitId = grgit.head().id + ext.sourceDate = grgit.head().getDate().format('yyyy-MM-dd HH:mm:ss Z') + grgit.close() + } catch (Exception e) { + logger.warn( '***** Unable to find Git workspace. Using default version information *****' ) + ext.branch = 'UNKNOWN' + ext.commitId = 'UNKNOWN' + ext.sourceDate = new Date().format('yyyy-MM-dd HH:mm:ss Z') + } + + ext.osArch = System.getProperty('os.arch') + ext.osName = System.getProperty('os.name') + ext.osVersion = System.getProperty('os.version') + ext.buildDate = new Date().format('yyyy-MM-dd HH:mm:ss Z') + ext.buildNumber = new Date().format('MMddyy') + ext.jdkVersion = System.getProperty('java.version') + def props = [ "Product-Name" : "Apache Geode (incubating)", "Product-Version" : version, - "Build-Id" : "${System.env.USER} ${new Date().format('MMddyy')}", - "Build-Date" : new Date().format('yyyy-MM-dd HH:mm:ss Z'), - "Build-Platform" : "${System.getenv('os.name')} ${System.getenv('os.version')} ${System.getenv('os.arch')}", - "Build-Java-Version": System.getenv('java.version'), + "Build-Id" : System.env.USER + ' ' + ext.buildNumber, + "Build-Date" : ext.buildDate, + "Build-Platform" : ext.osName + ' ' + ext.osVersion + ' ' + ext.osArch, + "Build-Java-Version": ext.jdkVersion, + "Source-Date" : ext.sourceDate, + "Source-Revision" : ext.commitId, + "Source-Repository" : ext.branch ] as Properties propertiesFile.getParentFile().mkdirs(); new FileOutputStream(propertiesFile).withStream { fos -> - props.plus(readScmInfo()).store(fos, '') + props.store(fos, '') } } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc38555c/gradle/rat.gradle ---------------------------------------------------------------------- diff --git a/gradle/rat.gradle b/gradle/rat.gradle index 3d0826a..f35b157 100644 --- a/gradle/rat.gradle +++ b/gradle/rat.gradle @@ -37,7 +37,6 @@ rat { 'native/**', 'wrapper/**', '**/build/**', - '.buildinfo', // SBT 'geode-spark-connector/**/target/**',