whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Another place where wunderbar version is defined
Date Sat, 26 Sep 2020 12:57:14 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 97827ce  Another place where wunderbar version is defined
97827ce is described below

commit 97827ceea0f98aaa4bb041006057488aa39c849d
Author: Sebb <sebb@apache.org>
AuthorDate: Sat Sep 26 13:57:05 2020 +0100

    Another place where wunderbar version is defined
---
 Rakefile    | 11 ++++++++---
 asf.gemspec |  4 +++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Rakefile b/Rakefile
index 8023b15..a5fd7cd 100644
--- a/Rakefile
+++ b/Rakefile
@@ -57,12 +57,17 @@ task :update, [:command] do |task, args|
     gems = gemlines.map {|line| [line[/['"](.*?)['"]/, 1], line.strip]}.to_h
     gems['whimsy-asf'].sub! /,.*/, ", path: #{Dir.pwd.inspect}"
 
+    # Also need to define version for wunderbar as per the asf.gemspec file
+    wunderbar_version = File.read(File.expand_path('wunderbar.version', __dir__)).chomp
     require 'tmpdir'
     Dir.mktmpdir do |dir|
       Dir.chdir dir do
-        File.write "Gemfile",
-          "source 'https://rubygems.org'\n#{gems.values.join("\n")}"
-
+        contents = [
+          "source 'https://rubygems.org'",
+          "wunderbar_version = '#{wunderbar_version}'",
+          gems.values
+        ].join("\n")
+        File.write "Gemfile", contents
         system('bundle', 'install')
       end
     end
diff --git a/asf.gemspec b/asf.gemspec
index 6ac263a..29d8f49 100644
--- a/asf.gemspec
+++ b/asf.gemspec
@@ -1,4 +1,6 @@
 version = File.read(File.expand_path('../asf.version', __FILE__)).strip
+# must agree with Rakefile:
+wunderbar_version = File.read(File.expand_path('wunderbar.version', __dir__)).chomp
 
 Gem::Specification.new do |s|
 
@@ -26,7 +28,7 @@ Gem::Specification.new do |s|
   s.add_dependency("ruby-ldap")
   s.add_dependency("tzinfo")
   s.add_dependency("tzinfo-data")
-  s.add_dependency("wunderbar")
+  s.add_dependency("wunderbar", wunderbar_version)
   s.add_dependency("rdoc")
 
   # If your tests use any gems, include them here


Mime
View raw message