You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2019/02/16 19:55:51 UTC

[buildr] branch master updated: Avoid redefining Ruby globals

This is an automated email from the ASF dual-hosted git repository.

donaldp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/buildr.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c7c44a  Avoid redefining Ruby globals
     new 9f3ec19  Merge pull request #40 from olleolleolle/fix/avoid-warnings-about-globals
1c7c44a is described below

commit 1c7c44a6b7ab5e4e99736ab81e9152a935d304fe
Author: Olle Jonsson <ol...@gmail.com>
AuthorDate: Sat Feb 16 15:56:28 2019 +0100

    Avoid redefining Ruby globals
---
 rakelib/release.rake | 2 +-
 rakelib/stage.rake   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rakelib/release.rake b/rakelib/release.rake
index a4073d4..8370cf8 100644
--- a/rakelib/release.rake
+++ b/rakelib/release.rake
@@ -13,7 +13,7 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-RC_VERSION = ENV['RC_VERSION'] || ''
+RC_VERSION = ENV['RC_VERSION'] || '' unless defined?(RC_VERSION)
 
 desc 'Release the next version of buildr from existing staged repository'
 task 'release' do
diff --git a/rakelib/stage.rake b/rakelib/stage.rake
index 1c22693..06cd526 100644
--- a/rakelib/stage.rake
+++ b/rakelib/stage.rake
@@ -18,8 +18,8 @@ require 'digest/sha1'
 
 gpg_cmd = 'gpg2'
 
-STAGE_DATE = ENV['STAGE_DATE'] ||  Time.now.strftime('%Y-%m-%d')
-RC_VERSION = ENV['RC_VERSION'] || ''
+STAGE_DATE = ENV['STAGE_DATE'] ||  Time.now.strftime('%Y-%m-%d') unless defined?(STAGE_DATE)
+RC_VERSION = ENV['RC_VERSION'] || '' unless defined?(RC_VERSION)
 
 task 'prepare' do
   # Update source files to next release number.