This is an automated email from the ASF dual-hosted git repository. toulmean pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
The following commit(s) were added to refs/heads/master by this push: new e9e09ee Make sure distros only use the fixed version without SNAPSHOT e9e09ee is described below commit e9e09eeb4cea1e4a5541560cdf9fc742baa6f425 Author: Antoine Toulme <anto...@lunar-ocean.com> AuthorDate: Sun Oct 25 23:11:15 2020 -0700 Make sure distros only use the fixed version without SNAPSHOT --- build.gradle | 6 +++--- dist/build.gradle | 25 ++++++++++++++++++++++++- gradle.properties | 1 + 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 0c507c7..6788146 100644 --- a/build.gradle +++ b/build.gradle @@ -44,10 +44,10 @@ description = 'A set of libraries and other tools to aid development of blockcha // Version numbering def versionNumber = '1.3.0' -def buildVersion = versionNumber + buildTag() +def buildVersion = versionNumber + buildTag(buildRelease) -static String buildTag() { - if (System.getenv('BUILD_RELEASE') == 'true') { +static String buildTag(releaseBuild) { + if (releaseBuild == 'true' || System.getenv('BUILD_RELEASE') == 'true') { return '' } if (System.getenv('BUILD_TIMESTAMP') != null) { diff --git a/dist/build.gradle b/dist/build.gradle index 3687352..3ee2f0a 100644 --- a/dist/build.gradle +++ b/dist/build.gradle @@ -32,6 +32,26 @@ static def mandatoryFiles(CopySpec spec) { spec.into('licenses') { from '../build/reports/license' } } +task builtGradleProperties() { + doLast { + new File(project.buildDir, "gradle.properties").text = """ +# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE +# file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file +# to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +buildRelease=true +""" + } +} + +assemble.dependsOn builtGradleProperties + distributions { main { distributionBaseName = 'tuweni-bin' @@ -71,6 +91,10 @@ distributions { sources { distributionBaseName = 'tuweni-src' contents { + into('') { + from 'build' + include 'gradle.properties' + } mandatoryFiles(it) into('') { from ".." @@ -83,7 +107,6 @@ distributions { include 'gradle/resources/*' include 'gradle/*' include 'gradle/docker/*' - include 'gradle.properties' } rootProject.subprojects.each { s -> into(s.name) { diff --git a/gradle.properties b/gradle.properties index 8a68073..30d60e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,3 +12,4 @@ kotlin.code.style=official asfNexusUsername=none asfNexusPassword= +buildRelease=false --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@tuweni.apache.org For additional commands, e-mail: commits-h...@tuweni.apache.org