From b62b612e3a20eb7d60ce28854b23a8c350b2e2b2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 20 Aug 2014 18:29:29 -0400 Subject: v5 v6: version & changelog (& rakefile) --- rbuild | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'rbuild') diff --git a/rbuild b/rbuild index 94db4416..ab2e040a 100644 --- a/rbuild +++ b/rbuild @@ -37,8 +37,8 @@ #require 'mkmf' #create_makefile("sisu") #% manual settings, edit/update as required (note current default settings are obtained from sisu version yml file) -SiSU_version_next_stable = '5.6.1' #% set version -SiSU_version_next_unstable = '6.2.2' #% set version +SiSU_version_next_stable = '5.6.2' #% set version stable current +SiSU_version_next_unstable = '6.2.3' #% set version unstable dev #% rake file SiSU_version_generic_next_stable = '5.4.x' SiSU_version_generic_next_unstable = '6.0.x' @@ -148,7 +148,7 @@ module Utils resp='redo' print ask + " ['yes', 'no' or 'quit']: " resp=File.new('/dev/tty').gets.strip #resp=gets.strip - if resp == 'yes' then true + if resp == 'yes' then true elsif resp == 'no' then false elsif resp =~/^quit|exit$/ then exit else puts "[please type: 'yes', 'no' or 'quit']" @@ -504,6 +504,7 @@ desc "Setup/Install #{Project_details.name}: bin, lib, conf & data" task :setup_with_data=> [:setup_base,:setup_data] desc "check package version" task :sisuversion => [:sisu_version] + task :version => [:sisu_version] #desc "set package version" task :sisuversionset => [:sisu_version_set,:changelog_headers] desc "check gemspec info" -- cgit v1.2.3 From 38caf64938ef26c2c32c11fcb2c1e1263f81346d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 20 Aug 2014 18:31:17 -0400 Subject: rbuild, gem build a selected tagged sisu version --- rbuild | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'rbuild') diff --git a/rbuild b/rbuild index ab2e040a..261c5256 100644 --- a/rbuild +++ b/rbuild @@ -333,6 +333,46 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_#{vi[:version]}.orig.tar.xz end self end +module GitExtractTaggedVersionBuild + def upstream + system(%{ git checkout upstream }) + end + def self.git_tagged_versions(vb=nil) + if vb.tag + v=if vb.tag =~/sisu_[0-9](?:\.[0-9]){0,2}$/ then vb.tag + elsif vb.tag =~/^[0-9](?:\.[0-9]){0,2}$/ then 'sisu_' + vb.tag + else 'sisu_' + end + system(%{ git tag -l | ag --nocolor '^#{v}' }) + end + end + def self.git_checkout_and_build_version(vb) + begin + ver=if vb.tag =~/sisu_[0-9]\.[0-9]+\.[0-9]+/ then vb.tag + elsif vb.tag =~/^[0-9]\.[0-9]+\.[0-9]+/ then 'sisu_' + vb.tag + else vb.branch + end + install_branch=case vb.branch + when /^(?:stable|unstable)$/ + "gem_create_build_install_#{vb.branch}" + when /^(?:all)/ + 'gem_create_build_install' + else + 'gem_create_build_install_stable' + end + commands =<<-WOK + git checkout #{ver} && + rake #{install_branch}; + WOK + puts commands + system(commands) + ensure + system(%{ + git checkout upstream + }) + end + end +end module Gemspecs def self.info(vi) puts <<-WOK @@ -691,6 +731,29 @@ desc 'Help' #desc "Setup/Install #{Project_details.name} (uses filelist)" task :install => [:default_notice,:project] task :install_bin => [:setup_bin_] +#desc "search for a version tag e.g. 'tag[5.6.0]'" + task :tag, [:tag] do |t, args| + args.with_defaults(:tag => Version_info::Next.setting_stable[:version]) + puts "Check for Version Tag: #{args.tag}" + print "Version Tag: " + GitExtractTaggedVersionBuild::git_tagged_versions(args) + end +#desc "build and install a specific git tagged version of sisu, e.g. 'build[5.6.0]'" + task :build, [:tag, :branch] => :done do |t, args| + args.with_defaults(:tag => '5.6.0', :branch => 'stable') + puts "Version Tag: #{args.tag}" + puts "Branch: #{args.branch}" + GitExtractTaggedVersionBuild::git_tagged_versions(args.tag) + ans= <<-WOK + Gem Install SiSU Version + WOK + resp=Utils.answer?(ans) + exit unless resp + GitExtractTaggedVersionBuild::git_checkout_and_build_version(args) + end + task :done do + puts 'done' + end #%% setup/install tasks task :rant_independence do #notice resp='' -- cgit v1.2.3