From bd7ae5db3f6cc7264f0ffba43a9bb3d34cf1f89e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 20:38:47 -0500 Subject: v4 v5: version & changelog --- data/doc/sisu/CHANGELOG_v4 | 7 +++++++ data/doc/sisu/CHANGELOG_v5 | 7 +++++++ data/sisu/v4/v/version.yml | 6 +++--- data/sisu/v5/v/version.yml | 6 +++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 7e451e0a..663a5ff4 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -23,6 +23,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 4.2.14.orig.tar.xz (2013-12-03:48/2) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.14 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.14-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.14.orig.tar.xz + sisu_4.2.14.orig.tar.xz + sisu_4.2.14-1.dsc + %% 4.2.13.orig.tar.xz (2013-12-02:48/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.13 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.13-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 1403cb6f..1912ac7b 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -23,6 +23,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 5.1.1.orig.tar.xz (2013-12-03:48/2) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.1.1 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.1.1-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_5.1.1.orig.tar.xz + sisu_5.1.1.orig.tar.xz + sisu_5.1.1-1.dsc + %% 5.1.0.orig.tar.xz (2013-12-02:48/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.1.0 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.1.0-1 diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 08ef67b4..ede4c0a5 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.2.13 -:date_stamp: 2013w48/1 -:date: "2013-12-02" +:version: 4.2.14 +:date_stamp: 2013w48/2 +:date: "2013-12-03" :project: SiSU diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml index 52a05b4d..b0e7bb7c 100644 --- a/data/sisu/v5/v/version.yml +++ b/data/sisu/v5/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 5.1.0 -:date_stamp: 2013w48/1 -:date: "2013-12-02" +:version: 5.1.1 +:date_stamp: 2013w48/2 +:date: "2013-12-03" :project: SiSU -- cgit v1.2.3 From ff66e3f0b5d82901d475007e8d5208d99e0fb543 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 20:41:03 -0500 Subject: v4 v5: rake create build & install sisu gemspec; (.gitignore), work on * gemspec adjusted to install only libraries related to a version (v4 or v5) * select sisu version to create, build & install --- .gitignore | 4 +- data/doc/sisu/CHANGELOG_v4 | 4 + data/doc/sisu/CHANGELOG_v5 | 4 + lib/sisu/v4/sysenv.rb | 2 +- lib/sisu/v5/sysenv.rb | 2 +- rbuild | 412 +++++++++++++++++++++++++++++++++------------ 6 files changed, 319 insertions(+), 109 deletions(-) diff --git a/.gitignore b/.gitignore index b5bf83df..6d13f762 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): *~ -sisu-*.gem -sisu*.gemspec +*.gem +*.gemspec diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 663a5ff4..24909dd4 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -30,6 +30,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.14.orig.tar.xz sisu_4.2.14.orig.tar.xz sisu_4.2.14-1.dsc +* rake create build & install sisu gemspec; (.gitignore), work on + * gemspec adjusted to install only libraries related to a version (v4 or v5) + * select sisu version to create, build & install + %% 4.2.13.orig.tar.xz (2013-12-02:48/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.13 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.13-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 1912ac7b..aecfa02a 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.1.1.orig.tar.xz sisu_5.1.1.orig.tar.xz sisu_5.1.1-1.dsc +* rake create build & install sisu gemspec; (.gitignore), work on + * gemspec adjusted to install only libraries related to a version (v4 or v5) + * select sisu version to create, build & install + %% 5.1.0.orig.tar.xz (2013-12-02:48/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.1.0 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.1.0-1 diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 9b887788..c0598070 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -3619,7 +3619,7 @@ WOK else '-v' end SiSU_Screen::Ansi.new(opt_cmd,version[:project],version[:version],version[:date_stamp],version[:date],rb_ver).version - else puts 'SiSU version information not available' + else puts 'SiSU (version information not available)' end end def sisu_about diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 1f5d7d3a..65cc0460 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -3736,7 +3736,7 @@ WOK else '-v' end SiSU_Screen::Ansi.new(opt_cmd,version[:project],version[:version],version[:date_stamp],version[:date],rb_ver).version - else puts 'SiSU version information not available' + else puts 'SiSU (version information not available)' end end def sisu_about diff --git a/rbuild b/rbuild index f2cc6638..b0e7c289 100644 --- a/rbuild +++ b/rbuild @@ -37,6 +37,12 @@ raise 'Please, use ruby1.9.3 or later.' if RUBY_VERSION < '1.9.3' #%% produce a makefile suitable for the target platform #require 'mkmf' #create_makefile("sisu") +#% manual settings, edit/update as required (note current default settings are obtained from sisu version yml file) +SiSU_manual_setting_v_current = '4.2.x' +SiSU_manual_setting_v_next = '5.1.x' +#% rake file +SiSU_dir_v_current = 'v4' +SiSU_dir_v_next = 'v5' require 'find' require 'fileutils' #require 'ftools' @@ -148,6 +154,7 @@ def chmod_util(place) end #%% using a directory and its mapping def setup_find_create(dir_get,dir_put,exclude_files=['']) #primary, + begin Find.find("#{@p.dir.pwd}/#{dir_get}") do |f| stub=f.scan(/#{@p.dir.pwd}\/#{dir_get}\/(\S+)/).join place="#{dir_put}/#{stub}" @@ -165,6 +172,9 @@ def setup_find_create(dir_get,dir_put,exclude_files=['']) #p end puts "#{action}#{stub}" end + rescue + puts "\n\n<< are you root? required for install >>" + end end def setup_find_cp_r(dir_get,dir_put) #secondary, using recursive copy Find.find("#{@p.dir.pwd}/#{dir_get}") do |f| @@ -206,32 +216,31 @@ WOK end def sisu_version_info def version_file - def v4 - 'data/sisu/v4/v/version.yml' - #"#{Dir.pwd}/data/sisu/v4/v/version.yml" + def v_current_ + "data/sisu/#{SiSU_dir_v_current}/v/version.yml" end - def v5 - 'data/sisu/v5/v/version.yml' + def v_next_ + "data/sisu/#{SiSU_dir_v_next}/v/version.yml" end self end - def v4 - v="#{Dir.pwd}/#{version_file.v4}" + def yml_setting_v_current + v="#{Dir.pwd}/#{version_file.v_current_}" if File.exist?(v) YAML::load(File::open(v)) else '' end end - def v5 - v="#{Dir.pwd}/#{version_file.v5}" + def yml_setting_v_next + v="#{Dir.pwd}/#{version_file.v_next_}" if File.exist?(v) YAML::load(File::open(v)) else '' end end def current - puts v4 - puts v5 + puts yml_setting_v_current + puts yml_setting_v_next end def system_date `date "+%Y-%m-%d"`.strip @@ -240,18 +249,18 @@ def sisu_version_info `date "+%Yw%W/%u"`.strip end def set - def v4 + def manual_setting_v_current { project: 'SiSU', - version: '4.2.13', + version: "#{SiSU_manual_setting_v_current}", date: "#{system_date}", date_stamp: "#{system_date_stamp}", } end - def v5 + def manual_setting_v_next { project: 'SiSU', - version: '5.0.26', + version: "#{SiSU_manual_setting_v_next}", date: "#{system_date}", date_stamp: "#{system_date_stamp}", } @@ -276,49 +285,49 @@ proceed? } puts %{*WARN* is the file or directory writable? could not create #{filename}} end end - def commit_v4 + def commit_v_current versioninfo= <<-WOK --- -:version: #{sisu_version_info.v4[:version]} -:date_stamp: #{sisu_version_info.v4[:date_stamp]} -:date: "#{sisu_version_info.v4[:date]}" -:project: #{sisu_version_info.v4[:project]} +:version: #{sisu_version_info.yml_setting_v_current[:version]} +:date_stamp: #{sisu_version_info.yml_setting_v_current[:date_stamp]} +:date: "#{sisu_version_info.yml_setting_v_current[:date]}" +:project: #{sisu_version_info.yml_setting_v_current[:project]} WOK - puts version_file.v4 - version_info_commit(version_file.v4,versioninfo,set.v4,sisu_version_info.v4,version_file.v4) + puts version_file.v_current_ + version_info_commit(version_file.v_current_,versioninfo,set.manual_setting_v_current,sisu_version_info.yml_setting_v_current,version_file.v_current_) end - def commit_v5 + def commit_v_next versioninfo= <<-WOK --- -:version: #{sisu_version_info.v5[:version]} -:date_stamp: #{sisu_version_info.v5[:date_stamp]} -:date: "#{sisu_version_info.v5[:date]}" -:project: #{sisu_version_info.v5[:project]} +:version: #{sisu_version_info.yml_setting_v_next[:version]} +:date_stamp: #{sisu_version_info.yml_setting_v_next[:date_stamp]} +:date: "#{sisu_version_info.yml_setting_v_next[:date]}" +:project: #{sisu_version_info.yml_setting_v_next[:project]} WOK - puts version_file.v5 - version_info_commit(version_file.v5,versioninfo,set.v5,sisu_version_info.v5,version_file.v5) + puts version_file.v_next_ + version_info_commit(version_file.v_next_,versioninfo,set.manual_setting_v_next,sisu_version_info.yml_setting_v_next,version_file.v_next_) end def date_info end def changelog_header - def v4 + def v_current <<-WOK -%% #{sisu_version_info.v4[:version]}.orig.tar.xz (#{sisu_version_info.v4[:date]}:#{sisu_version_info.v4[:date_stamp]}) -http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_#{sisu_version_info.v4[:version]} -http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_#{sisu_version_info.v4[:version]}-1 -http://www.jus.uio.no/sisu/pkg/src/sisu_#{sisu_version_info.v4[:version]}.orig.tar.xz - sisu_#{sisu_version_info.v4[:version]}.orig.tar.xz - sisu_#{sisu_version_info.v4[:version]}-1.dsc +%% #{sisu_version_info.yml_setting_v_current[:version]}.orig.tar.xz (#{sisu_version_info.yml_setting_v_current[:date]}:#{sisu_version_info.yml_setting_v_current[:date_stamp]}) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_#{sisu_version_info.yml_setting_v_current[:version]} +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_#{sisu_version_info.yml_setting_v_current[:version]}-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_#{sisu_version_info.yml_setting_v_current[:version]}.orig.tar.xz + sisu_#{sisu_version_info.yml_setting_v_current[:version]}.orig.tar.xz + sisu_#{sisu_version_info.yml_setting_v_current[:version]}-1.dsc WOK end - def v5 + def v_next <<-WOK -%% #{sisu_version_info.v5[:version]}.orig.tar.xz (#{sisu_version_info.v5[:date]}:#{sisu_version_info.v5[:date_stamp]}) -http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_#{sisu_version_info.v5[:version]} -http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_#{sisu_version_info.v5[:version]}-1 -http://www.jus.uio.no/sisu/pkg/src/sisu_#{sisu_version_info.v5[:version]}.orig.tar.xz - sisu_#{sisu_version_info.v5[:version]}.orig.tar.xz - sisu_#{sisu_version_info.v5[:version]}-1.dsc +%% #{sisu_version_info.yml_setting_v_next[:version]}.orig.tar.xz (#{sisu_version_info.yml_setting_v_next[:date]}:#{sisu_version_info.yml_setting_v_next[:date_stamp]}) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_#{sisu_version_info.yml_setting_v_next[:version]} +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_#{sisu_version_info.yml_setting_v_next[:version]}-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_#{sisu_version_info.yml_setting_v_next[:version]}.orig.tar.xz + sisu_#{sisu_version_info.yml_setting_v_next[:version]}.orig.tar.xz + sisu_#{sisu_version_info.yml_setting_v_next[:version]}-1.dsc WOK end self @@ -332,20 +341,46 @@ def version_update_manual puts 'date_stamp: ' + `date "+%Yw%W/%u"` end def gemspecs - def sisu4 + def sisu_info_current + puts <<-WOK +-- +name: #{sisu_version_info.yml_setting_v_current[:project].downcase} +version: #{sisu_version_info.yml_setting_v_current[:version]} +date: #{sisu_version_info.yml_setting_v_current[:date]} +summary: #{sisu_version_info.yml_setting_v_current[:project]} + WOK + end + def sisu_yml_current + <<-WOK +Gem::Specification.new do |s| + s.name = '#{sisu_version_info.yml_setting_v_current[:project].downcase}' + s.version = '#{sisu_version_info.yml_setting_v_current[:version]}' + s.date = '#{sisu_version_info.yml_setting_v_current[:date]}' + s.summary = '#{sisu_version_info.yml_setting_v_current[:project]}' + s.description = 'SiSU gem' + s.authors = ["Ralph Amissah"] + s.email = 'ralph.amissah@gmail.com' + s.files = Dir['lib/sisu/#{SiSU_dir_v_current}/*.rb'] + + Dir['data/sisu/#{SiSU_dir_v_current}/v/version.yml'] + + Dir['bin/sisugem'] + + Dir['bin/sisu'] + s.license = 'GPL3' + s.executables << 'sisugem' << 'sisu' +end + WOK + end + def sisu_manual_setting_current <<-WOK Gem::Specification.new do |s| - s.name = '#{sisu_version_info.v4[:project].downcase}' - s.version = '#{sisu_version_info.v4[:version]}' - s.date = '#{sisu_version_info.v4[:date]}' - s.summary = '#{sisu_version_info.v4[:project]}' + s.name = '#{sisu_version_info.set.manual_setting_v_current[:project].downcase}' + s.version = '#{sisu_version_info.set.manual_setting_v_current[:version]}' + s.date = '#{sisu_version_info.set.manual_setting_v_current[:date]}' + s.summary = '#{sisu_version_info.set.manual_setting_v_current[:project]}' s.description = 'SiSU gem' s.authors = ["Ralph Amissah"] s.email = 'ralph.amissah@gmail.com' - s.files = Dir['lib/sisu/v4/*.rb'] + - Dir['lib/sisu/v5/*.rb'] + - Dir['data/sisu/v4/v/version.yml'] + - Dir['data/sisu/v5/v/version.yml'] + + s.files = Dir['lib/sisu/#{SiSU_dir_v_current}/*.rb'] + + Dir['data/sisu/#{SiSU_dir_v_current}/v/version.yml'] + Dir['bin/sisugem'] + Dir['bin/sisu'] s.license = 'GPL3' @@ -353,20 +388,46 @@ Gem::Specification.new do |s| end WOK end - def sisu5 + def sisu_info_next + puts <<-WOK +-- +name: #{sisu_version_info.yml_setting_v_next[:project].downcase} +version: #{sisu_version_info.yml_setting_v_next[:version]} +date: #{sisu_version_info.yml_setting_v_next[:date]} +summary: #{sisu_version_info.yml_setting_v_next[:project]} + WOK + end + def sisu_yml_next <<-WOK Gem::Specification.new do |s| - s.name = '#{sisu_version_info.v5[:project].downcase}' - s.version = '#{sisu_version_info.v5[:version]}' - s.date = '#{sisu_version_info.v5[:date]}' - s.summary = '#{sisu_version_info.v5[:project]}' + s.name = '#{sisu_version_info.yml_setting_v_next[:project].downcase}' + s.version = '#{sisu_version_info.yml_setting_v_next[:version]}' + s.date = '#{sisu_version_info.yml_setting_v_next[:date]}' + s.summary = '#{sisu_version_info.yml_setting_v_next[:project]}' s.description = 'SiSU gem' s.authors = ["Ralph Amissah"] s.email = 'ralph.amissah@gmail.com' - s.files = Dir['lib/sisu/v4/*.rb'] + - Dir['lib/sisu/v5/*.rb'] + - Dir['data/sisu/v4/v/version.yml'] + - Dir['data/sisu/v5/v/version.yml'] + + s.files = Dir['lib/sisu/#{SiSU_dir_v_next}/*.rb'] + + Dir['data/sisu/#{SiSU_dir_v_next}/v/version.yml'] + + Dir['bin/sisugem'] + + Dir['bin/sisu'] + s.license = 'GPL3' + s.executables << 'sisugem' << 'sisu' +end + WOK + end + def sisu_manual_setting_next + <<-WOK +Gem::Specification.new do |s| + s.name = '#{sisu_version_info.set.manual_setting_v_next[:project].downcase}' + s.version = '#{sisu_version_info.set.manual_setting_v_next[:version]}' + s.date = '#{sisu_version_info.set.manual_setting_v_next[:date]}' + s.summary = '#{sisu_version_info.set.manual_setting_v_next[:project]}' + s.description = 'SiSU gem' + s.authors = ["Ralph Amissah"] + s.email = 'ralph.amissah@gmail.com' + s.files = Dir['lib/sisu/#{SiSU_dir_v_next}/*.rb'] + + Dir['data/sisu/#{SiSU_dir_v_next}/v/version.yml'] + Dir['bin/sisugem'] + Dir['bin/sisu'] s.license = 'GPL3' @@ -384,28 +445,66 @@ end puts %{*WARN* is the file or directory writable? could not create #{filename}} end end - def sisu4_gemspec_create - filename='sisu4.gemspec' - gemspec_create(filename,sisu4) + def sisu_filename_yml_current + "sisu-#{sisu_version_info.yml_setting_v_current[:version]}" + end + def sisu_filename_yml_next + "sisu-#{sisu_version_info.yml_setting_v_next[:version]}" end - def sisu5_gemspec_create - filename='sisu5.gemspec' - gemspec_create(filename,sisu5) + def sisu_filename_manual_current + "sisu-#{sisu_version_info.set.manual_setting_v_current[:version]}" end - def sisu4_build - system(%{ gem build sisu4.gemspec }) + def sisu_filename_manual_next + "sisu-#{sisu_version_info.set.manual_setting_v_next[:version]}" end - def sisu5_build - system(%{ gem build sisu5.gemspec }) + def sisu_gemspec_create_current + filename="#{sisu_filename_yml_current}.gemspec" + gemspec_create(filename,sisu_yml_current) + gemspec_create('sisu-current.gemspec',sisu_yml_current) end - def sisu4_install + def sisu_gemspec_create_next + filename="#{sisu_filename_yml_next}.gemspec" + gemspec_create(filename,sisu_yml_next) + gemspec_create('sisu-next.gemspec',sisu_yml_next) + end + def sisu_gemspec_create_manual_version_current + filename="#{sisu_filename_manual_current}.gemspec" + gemspec_create(filename,sisu_manual_setting_current) + end + def sisu_gemspec_create_manual_version_next + filename="#{sisu_filename_manual_next}.gemspec" + gemspec_create(filename,sisu_manual_setting_next) + end + def sisu_build_current + system(%{ gem build #{sisu_filename_yml_current}.gemspec }) + end + def sisu_build_next + system(%{ gem build #{sisu_filename_yml_next}.gemspec }) + end + def sisu_build_manual_current + system(%{ gem build #{sisu_filename_manual_current}.gemspec}) + end + def sisu_build_manual_next + system(%{ gem build #{sisu_filename_manual_next}.gemspec}) + end + def sisu_install_current system(%{ - sudo gem install --no-rdoc --no-ri --verbose sisu-#{sisu_version_info.v4[:version]}.gem + sudo gem install --no-rdoc --no-ri --verbose sisu-#{sisu_version_info.yml_setting_v_current[:version]}.gem }) end - def sisu5_install + def sisu_install_next system(%{ - sudo gem install --no-rdoc --no-ri --verbose sisu-#{sisu_version_info.v5[:version]}.gem + sudo gem install --no-rdoc --no-ri --verbose sisu-#{sisu_version_info.yml_setting_v_next[:version]}.gem + }) + end + def sisu_install_manual_current + system(%{ + sudo gem install --no-rdoc --no-ri --verbose #{sisu_filename_manual_current}.gem + }) + end + def sisu_install_manual_next + system(%{ + sudo gem install --no-rdoc --no-ri --verbose #{sisu_filename_manual_next}.gem }) end self @@ -460,18 +559,73 @@ desc "check package version" task :sisuversion => [:sisu_version] desc "set package version" task :sisuversionset => [:sisu_version_set] -desc "check gempsec info" +desc "check gemspec info" task :gemspec => [:gemspec_info] -desc "create gempsec" -task :gemspecscreate => [:gemspecs_create] +desc "create sisu v_current gemspec" +task :gem4cs => [:gemspecs_current_create_default_version] +task :gem4createspecs => [:gemspecs_current_create_default_version] +desc "create sisu v_next gemspec" +task :gem5cs => [:gemspecs_next_create_default_version] +task :gem5createspecs => [:gemspecs_next_create_default_version] +desc "create gemspec" +task :gemcs => [:gemspecs_create_default_version] +task :gemc => [:gemspecs_create_default_version] +task :gemspecscreate => [:gemspecs_create_default_version] +#--- desc "build gem" +task :gemb => [:gem_build] task :gembuild => [:gem_build] +desc "build sisu v_current gem" +task :gem4b => [:gem_current_build] +task :gem4build => [:gem_current_build] +desc "build sisu v_next gem" +task :gem5b => [:gem_next_build] +task :gem5build => [:gem_next_build] desc "install gem" +task :gemi => [:gem_install] task :geminstall => [:gem_install] -desc "build and install gem" -task :gembuildinstall => [:gem_build,:gem_install] -desc "create, build and install sisu gem" -task :gemcbi => [:gemspecs_create,:gem_build,:gem_install] +desc "build & install sisu v_current gem" +task :gem4bi => [:gem_current_build,:gem_install] +desc "build & install sisu v_next gem" +task :gem5bi => [:gem_next_build,:gem_install] +desc "build & install gem" +task :gembi => [:gem_build,:gem_install] +desc "create, build & install sisu v_current gem" +task :gem4cbi => [:gemspecs_current_create_default_version,:gem_current_build,:gem_current_install] +desc "create, build & install sisu v_next gem" +task :gem5cbi => [:gemspecs_next_create_default_version,:gem_next_build,:gem_next_install] +desc "create, build & install sisu v_current & v_next gem" +task :gemcbi => [:gemspecs_create_default_version,:gem_build,:gem_install] +#--- +desc "create sisu v_current gemspec, manually set version" +task :gem4csm => [:gemspecs_current_create_manual_version] +desc "create sisu v_next gemspec, manually set version" +task :gem5csm => [:gemspecs_next_create_manual_version] +desc "create gemspec, manually set version" +task :gemcsm => [:gemspecs_create_manual_version] +task :gemcm => [:gemspecs_create_manual_version] +#--- +desc "build gem" +task :gembm => [:gem_build_manual_version] +desc "build sisu v_current gem" +task :gem4bm => [:gem_current_build_manual_version] +desc "build sisu v_next gem" +task :gem5bm => [:gem_next_build_manual_version] +desc "install gem" +task :gemim => [:gem_install_manual_version] +desc "build & install sisu v_current gem" +task :gem4bim => [:gem_current_build_manual_version,:gem_install_manual_version] +desc "build & install sisu v_next gem" +task :gem5bim => [:gem_next_build_manual_version,:gem_install_manual_version] +desc "build & install gem" +task :gembim => [:gem_build_manual_version,:gem_install_manual_version] +desc "create, build & install sisu v_current gem" +task :gem4cbim => [:gemspecs_current_create_manual_version,:gem_current_build_manual_version,:gem_current_install_manual_version] +desc "create, build & install sisu v_next gem" +task :gem5cbim => [:gemspecs_next_create_manual_version,:gem_next_build_manual_version,:gem_next_install_manual_version] +desc "create, build & install sisu v_current & v_next gem" +task :gemcbim => [:gemspecs_create_manual_version,:gem_build_manual_version,:gem_install_manual_version] +#--- desc "check changelog headers" task :changelogheaders => [:changelog_headers] if File.directory?('bin') #bin @@ -625,47 +779,95 @@ task :setup_vim do #man end task :gemspec_info do #man version_update_manual - gemspecs.sisu4 - gemspecs.sisu5 + gemspecs.sisu_info_current + gemspecs.sisu_info_next end -task :gemspecs_create do #man - gemspecs.sisu4_gemspec_create - gemspecs.sisu5_gemspec_create +task :gemspecs_current_create_default_version do #man + gemspecs.sisu_gemspec_create_current +end +task :gemspecs_next_create_default_version do #man + gemspecs.sisu_gemspec_create_next +end +task :gemspecs_create_default_version do #man + gemspecs.sisu_gemspec_create_current + gemspecs.sisu_gemspec_create_next +end +task :gemspecs_current_create_manual_version do #man + gemspecs.sisu_gemspec_create_manual_version_current +end +task :gemspecs_next_create_manual_version do #man + gemspecs.sisu_gemspec_create_manual_version_next +end +task :gemspecs_create_manual_version do #man + gemspecs.sisu_gemspec_create_manual_version_current + gemspecs.sisu_gemspec_create_manual_version_next +end +task :gem_current_build do #man + gemspecs.sisu_build_current +end +task :gem_next_build do #man + gemspecs.sisu_build_next end task :gem_build do #man - gemspecs.sisu4_build - gemspecs.sisu5_build + gemspecs.sisu_build_current + gemspecs.sisu_build_next +end +task :gem_current_build_manual_version do #man + gemspecs.sisu_build_manual_current +end +task :gem_next_build_manual_version do #man + gemspecs.sisu_build_manual_next +end +task :gem_build_manual_version do #man + gemspecs.sisu_build_manual_current + gemspecs.sisu_build_manual_next +end +task :gem_current_install do #man + gemspecs.sisu_install_current +end +task :gem_next_install do #man + gemspecs.sisu_install_next end task :gem_install do #man - gemspecs.sisu4_install - gemspecs.sisu5_install + gemspecs.sisu_install_current + gemspecs.sisu_install_next +end +task :gem_current_install_manual_version do #man + gemspecs.sisu_install_manual_current +end +task :gem_next_install_manual_version do #man + gemspecs.sisu_install_manual_next +end +task :gem_install_manual_version do #man + gemspecs.sisu_install_manual_current + gemspecs.sisu_install_next end task :changelog_headers do #man puts '---' - puts sisu_version_info.set.changelog_header.v4 + puts sisu_version_info.set.changelog_header.v_current puts '---' - puts sisu_version_info.set.changelog_header.v5 + puts sisu_version_info.set.changelog_header.v_next end task :sisu_version do #man - puts sisu_version_info.set.v4 - puts sisu_version_info.set.v5 + puts sisu_version_info.set.manual_setting_v_current + puts sisu_version_info.set.manual_setting_v_next puts sisu_version_info.current #version.current.each do |x| # puts x #end - puts sisu_version_info.v4[:project] - puts sisu_version_info.v4[:version] - puts sisu_version_info.v4[:date] - puts sisu_version_info.v4[:date_stamp] + puts sisu_version_info.yml_setting_v_current[:project] + puts sisu_version_info.yml_setting_v_current[:version] + puts sisu_version_info.yml_setting_v_current[:date] + puts sisu_version_info.yml_setting_v_current[:date_stamp] puts '---' - puts sisu_version_info.v5[:project] - puts sisu_version_info.v5[:version] - puts sisu_version_info.v5[:date] - puts sisu_version_info.v5[:date_stamp] + puts sisu_version_info.yml_setting_v_next[:project] + puts sisu_version_info.yml_setting_v_next[:version] + puts sisu_version_info.yml_setting_v_next[:date] + puts sisu_version_info.yml_setting_v_next[:date_stamp] end task :sisu_version_set do #man - sisu_version_info.set.commit_v4 - sisu_version_info.set.commit_v5 + sisu_version_info.set.commit_v_current + sisu_version_info.set.commit_v_next end #%% post install #%% clobber/remove tasks -- cgit v1.2.3 From 676eba5360a6e6e07e4fc5dc79d2e2f076ea581c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 20:42:50 -0500 Subject: v4 v5: bin/sisu, simplify in relation to sisu gem --- bin/sisu | 38 +++++++++++--------------------------- data/doc/sisu/CHANGELOG_v4 | 2 ++ data/doc/sisu/CHANGELOG_v5 | 2 ++ 3 files changed, 15 insertions(+), 27 deletions(-) diff --git a/bin/sisu b/bin/sisu index 0786500f..501e439b 100644 --- a/bin/sisu +++ b/bin/sisu @@ -56,34 +56,18 @@ WOK SiSU_called_from_directory=Dir.pwd require 'rubygems' check_sisu_stable_ruby_version? - if __FILE__ =~/gem/ \ - and __FILE__ =~/sisu-[45]\.\d+\.\d+/ - SiSU_version_dir=(__FILE__ =~/sisu-5\.\d+\.\d+/) \ - ? 'v5' - : 'v4' - elsif $0 !~/\b(?:sisu[45]|sisugem)$/ - SiSU_version_dir=case argv.inspect - when /"(?:--v4)"/ - 'v4' - when /"(?:--v5)"/ - 'v5' - when /"--dev"/ - 'v5' - else - 'v4' - end + default_version=if __FILE__ =~/gem/ \ + and __FILE__ =~/\/sisu-[45]\.(?:\d+|[a-z])\.(?:\d+|[a-z])\// + SiSU_version_dir=(__FILE__ =~/\/sisu-5\.(?:\d+|[a-z])\.(?:\d+|[a-z])\//) ? 'v5' : 'v4' + else 'v4' + end + if $0 =~/\bsisu4$/ then 'v4' + elsif $0 =~/\bsisu5$/ then 'v5' else - SiSU_version_dir=case $0 - when /\bsisu4$/ - 'v4' - when /\bsisu5$/ - 'v5' - when /sisugem$/ # should have been caught earlier, unused, debug check - SiSU_version_dir=(__FILE__ =~/sisu-5\.\d+\.\d+/) \ - ? 'v5' - : 'v4' - else - 'v4' + SiSU_version_dir=case argv.inspect + when /"(?:--v4|--current|--stable)"/ then 'v4' + when /"(?:--v5|--next|--dev)"/ then 'v5' + else default_version end end #% $0 File.expand_path($0) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 24909dd4..f01d56cd 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -34,6 +34,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.14.orig.tar.xz * gemspec adjusted to install only libraries related to a version (v4 or v5) * select sisu version to create, build & install +* bin/sisu, simplify in relation to sisu gem + %% 4.2.13.orig.tar.xz (2013-12-02:48/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.13 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.13-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index aecfa02a..04eae664 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -34,6 +34,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.1.1.orig.tar.xz * gemspec adjusted to install only libraries related to a version (v4 or v5) * select sisu version to create, build & install +* bin/sisu, simplify in relation to sisu gem + %% 5.1.0.orig.tar.xz (2013-12-02:48/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.1.0 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.1.0-1 -- cgit v1.2.3