aboutsummaryrefslogtreecommitdiffhomepage
path: root/rbuild
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-12-09 22:29:17 -0500
committerRalph Amissah <ralph@amissah.com>2013-12-09 22:29:17 -0500
commitc8321f5f81808f49c44bd5e96b8c49f74b31f699 (patch)
treeb0989944bcbb973ef2337e0bb400f32484af5c79 /rbuild
parentdebian/changelog (4.2.14-1) (diff)
parentv5: docbook, structure, a fix (diff)
Merge tag 'sisu_4.2.15' into debian/sid
SiSU 4.2.15
Diffstat (limited to 'rbuild')
-rw-r--r--rbuild1051
1 files changed, 499 insertions, 552 deletions
diff --git a/rbuild b/rbuild
index b0e7c289..a4db2d0b 100644
--- a/rbuild
+++ b/rbuild
@@ -38,76 +38,78 @@ raise 'Please, use ruby1.9.3 or later.' if RUBY_VERSION < '1.9.3'
#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'
+SiSU_version_next_stable = '4.2.15'
+SiSU_version_next_unstable = '5.1.2'
#% rake file
-SiSU_dir_v_current = 'v4'
-SiSU_dir_v_next = 'v5'
+SiSU_version_generic_next_stable = '4.2.x'
+SiSU_version_generic_next_unstable = '5.1.x'
+SiSU_version_dir_stable = 'v4'
+SiSU_version_dir_unstable = 'v5'
require 'find'
require 'fileutils'
#require 'ftools'
require 'rbconfig.rb'
require 'yaml'
include FileUtils
-class Project_details
- def name
+module Project_details
+ def self.name
'SiSU'
end
- def rake_rant
+ def self.rake_rant
"Rakefile/Rantfile for the installation/setup of #{name}"
end
- def platform_notice
+ def self.platform_notice
"[#{name} is for the Linux/Unix Platforms]"
end
- def env
+ def self.env
Config::CONFIG
end
- def host
+ def self.host
env['host']
end
- def dir
- def proj
+ def self.dir
+ def self.proj
'sisu'
end
- def arch
+ def self.arch
env['archdir']
end
- def sitearch
+ def self.sitearch
env['sitearchdir']
end
- def bin
+ def self.bin
env['bindir']
end
- def lib
+ def self.lib
env['sitelibdir']
end
- def data
+ def self.data
env['datadir']
end
- def share
+ def self.share
"#{env['datadir']}/sisu"
end
- def conf
+ def self.conf
env['sysconfdir']
end
- def man
+ def self.man
env['mandir']
end
- def vim
+ def self.vim
"#{env['datadir']}/sisu/vim"
end
- def out
+ def self.out
"#{env['localstatedir']}/#{proj}"
end
- def rubylib
+ def self.rubylib
env['LIBRUBYARG_SHARED']
end
- def pwd
+ def self.pwd
Dir.pwd #ENV['PWD']
end
self
end
- def version
+ def self.version
stamp={}
v="#{dir.pwd}/conf/sisu/version.yml"
if File.exist?(v)
@@ -116,252 +118,243 @@ class Project_details
else ''
end
end
-end
-@p=Project_details.new
-def answer?(ask)
- resp='redo'
- print ask + " ['yes', 'no' or 'quit']: "
- resp=File.new('/dev/tty').gets.strip
- #resp=gets.strip
- if resp == 'yes'; true
- elsif resp == 'no'; false
- elsif resp =~/^quit|exit$/; exit
- else puts "[please type: 'yes', 'no' or 'quit']"
- answer?(ask)
- end
-end
-def default_notice
- ans= %{#{@p.rake_rant}
- Information on alternative actions is available using:
- [if rake (or rant) is installed:]
- "rake help" or "rake -T" (or "rant help" or "rant -T")
- Default action selected - "install #{@p.name}" proceed? }
- resp=answer?(ans)
- exit unless resp
-end
-def get_username
- gets.strip
-end
-def chmod_file(place)
- if place =~/\/bin/; File.chmod(0755,place)
- else File.chmod(0644,place)
- end
-end
-def chmod_util(place)
- if place =~/\/bin/; chmod(0755,place)
- else chmod(0644,place)
- end
-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}"
- action=case
- when File.file?(f)
- unless f =~/#{exclude_files.inspect}/
- cp(f,place)
- chmod_file(place)
- "-> #{dir_put}/"
- end
- when File.directory?(f)
- FileUtils.mkpath(place) unless FileTest.directory?(place)
- "./#{dir_get}/"
- else '?'
- 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|
- stub=f.scan(/#{@p.dir.pwd}\/#{dir_get}\/(\S+)/).join
- place="#{dir_put}/#{stub}"
- case
- when File.file?(f)
- cp_r(f,place)
- chmod_util(place)
- when File.directory?(f)
- mkdir(place) unless FileTest.directory?(place)
- end
- end
-end
-def system_info
- puts <<WOK
- #{@p.platform_notice}
+ def self.system_info
+ puts <<-WOK
+ #{Project_details.platform_notice}
Host
- host: #{@p.host}
- arch: #{@p.dir.arch}
- sitearch: #{@p.dir.sitearch}
+ host: #{Project_details.host}
+ arch: #{Project_details.dir.arch}
+ sitearch: #{Project_details.dir.sitearch}
Directories for installation
- bin: #{@p.dir.bin}
- lib (site-ruby): #{@p.dir.lib}/#{@p.dir.proj}/v*
- conf [etc]: #{@p.dir.conf}/#{@p.dir.proj}
- data (odf, shared images): #{@p.dir.share}
- vim (vim syntax, highlighting, ftplugin): #{@p.dir.data}/sisu/vim
- data (README, version_manifest): #{@p.dir.data}/doc/#{@p.dir.proj}
- man (manual pages): #{@p.dir.man}
- output: #{@p.dir.out}
- processing: #{@p.dir.out}/processing
- www: #{@p.dir.out}/www
+ bin: #{Project_details.dir.bin}
+ lib (site-ruby): #{Project_details.dir.lib}/#{Project_details.dir.proj}/v*
+ conf [etc]: #{Project_details.dir.conf}/#{Project_details.dir.proj}
+ data (odf, shared images): #{Project_details.dir.share}
+ vim (vim syntax, highlighting, ftplugin): #{Project_details.dir.data}/sisu/vim
+ data (README, version_manifest): #{Project_details.dir.data}/doc/#{Project_details.dir.proj}
+ man (manual pages): #{Project_details.dir.man}
+ output: #{Project_details.dir.out}
+ processing: #{Project_details.dir.out}/processing
+ www: #{Project_details.dir.out}/www
- rubylib: #{@p.dir.rubylib}
+ rubylib: #{Project_details.dir.rubylib}
-WOK
+ WOK
+ end
end
-def sisu_version_info
- def version_file
- def v_current_
- "data/sisu/#{SiSU_dir_v_current}/v/version.yml"
- end
- def v_next_
- "data/sisu/#{SiSU_dir_v_next}/v/version.yml"
+module Utils
+ def self.answer?(ask)
+ resp='redo'
+ print ask + " ['yes', 'no' or 'quit']: "
+ resp=File.new('/dev/tty').gets.strip #resp=gets.strip
+ if resp == 'yes'; true
+ elsif resp == 'no'; false
+ elsif resp =~/^quit|exit$/; exit
+ else puts "[please type: 'yes', 'no' or 'quit']"
+ answer?(ask)
end
- self
end
- def yml_setting_v_current
- v="#{Dir.pwd}/#{version_file.v_current_}"
- if File.exist?(v)
- YAML::load(File::open(v))
- else ''
+ def self.default_notice
+ ans= %{#{Project_details.rake_rant}
+ Information on alternative actions is available using:
+ [if rake (or rant) is installed:]
+ "rake help" or "rake -T" (or "rant help" or "rant -T")
+ Default action selected - "install #{Project_details.name}" proceed? }
+ resp=answer?(ans)
+ exit unless resp
+ end
+ def self.chmod_file(place)
+ if place =~/\/bin/; File.chmod(0755,place)
+ else File.chmod(0644,place)
end
end
- def yml_setting_v_next
- v="#{Dir.pwd}/#{version_file.v_next_}"
- if File.exist?(v)
- YAML::load(File::open(v))
- else ''
+ def self.chmod_util(place)
+ if place =~/\/bin/; chmod(0755,place)
+ else chmod(0644,place)
end
end
- def current
- puts yml_setting_v_current
- puts yml_setting_v_next
- end
- def system_date
+ def self.system_date
`date "+%Y-%m-%d"`.strip
end
- def system_date_stamp
+ def self.system_date_stamp
`date "+%Yw%W/%u"`.strip
end
- def set
- def manual_setting_v_current
- {
- project: 'SiSU',
- version: "#{SiSU_manual_setting_v_current}",
- date: "#{system_date}",
- date_stamp: "#{system_date_stamp}",
- }
+ def self.program_found?(prog)
+ found=`which #{prog}` #`whereis #{make}`
+ (found =~/bin\/#{prog}\b/) ? :true : :false
+ end
+end
+module Install
+ #%% using a directory and its mapping
+ def self.setup_find_create(dir_get,dir_put,exclude_files=['']) #primary,
+ begin
+ Find.find("#{Project_details.dir.pwd}/#{dir_get}") do |f|
+ stub=f.scan(/#{Project_details.dir.pwd}\/#{dir_get}\/(\S+)/).join
+ place="#{dir_put}/#{stub}"
+ action=case
+ when File.file?(f)
+ unless f =~/#{exclude_files.inspect}/
+ cp(f,place)
+ Utils.chmod_file(place)
+ "-> #{dir_put}/"
+ end
+ when File.directory?(f)
+ FileUtils.mkpath(place) unless FileTest.directory?(place)
+ "./#{dir_get}/"
+ else '?'
+ end
+ puts "#{action}#{stub}"
+ end
+ rescue
+ puts "\n\n<< are you root? required for install >>"
+ end
+ end
+ def self.setup_find_cp_r(dir_get,dir_put) #secondary, using recursive copy
+ Find.find("#{Project_details.dir.pwd}/#{dir_get}") do |f|
+ stub=f.scan(/#{Project_details.dir.pwd}\/#{dir_get}\/(\S+)/).join
+ place="#{dir_put}/#{stub}"
+ case
+ when File.file?(f)
+ cp_r(f,place)
+ Utils.chmod_util(place)
+ when File.directory?(f)
+ mkdir(place) unless FileTest.directory?(place)
+ end
+ end
+ end
+end
+module Version_info
+ def self.contents(vi)
+ <<-WOK
+---
+:project: #{vi[:project]}
+:version: #{vi[:version]}
+:date_stamp: #{vi[:date_stamp]}
+:date: "#{vi[:date]}"
+ WOK
+ end
+ module Current
+ def self.yml_file_path(version)
+ "data/sisu/#{version}/v/version.yml"
+ end
+ def self.settings(file)
+ v="#{Dir.pwd}/#{file}"
+ if File.exist?(v)
+ YAML::load(File::open(v))
+ else ''
+ end
+ end
+ def self.file_stable
+ yml_file_path(SiSU_version_dir_stable)
+ end
+ def self.file_unstable
+ yml_file_path(SiSU_version_dir_unstable)
end
- def manual_setting_v_next
+ def self.setting_stable
+ settings(file_stable)
+ end
+ def self.setting_unstable
+ settings(file_unstable)
+ end
+ def self.content_stable
+ Version_info.contents(setting_stable)
+ end
+ def self.content_unstable
+ Version_info.contents(setting_unstable)
+ end
+ end
+ module Next
+ def self.settings(v)
{
project: 'SiSU',
- version: "#{SiSU_manual_setting_v_next}",
- date: "#{system_date}",
- date_stamp: "#{system_date_stamp}",
+ version: "#{v}",
+ date: "#{Utils.system_date}",
+ date_stamp: "#{Utils.system_date_stamp}",
}
end
- def version_info_commit(filename,versioninfo,newversioninfo,existingversioninfo,version_file_is)
+ def self.setting_stable
+ settings(SiSU_version_next_stable)
+ end
+ def self.setting_unstable
+ settings(SiSU_version_next_unstable)
+ end
+ def self.content_stable
+ Version_info.contents(setting_stable)
+ end
+ def self.content_unstable
+ Version_info.contents(setting_unstable)
+ end
+ end
+ module Update
+ def self.version_info_update_commit(filename,vi_hash_current,vi_content_current,vi_hash_next,vi_content_next)
ans=%{update sisu version info replacing:
- #{existingversioninfo.sort}
+ #{vi_hash_current.sort}
with:
- #{newversioninfo.sort}
+ #{vi_hash_next.sort}
-#{version_file_is} becoming:
-#{versioninfo}
+#{vi_content_current} becoming:
+#{vi_content_next}
proceed? }
- resp=answer?(ans)
+ resp=Utils.answer?(ans)
exit unless resp
fn="#{Dir.pwd}/#{filename}"
if File.writable?("#{Dir.pwd}/.")
file_version=File.new(fn,'w+')
- file_version << versioninfo
+ file_version << vi_content_next
file_version.close
else
puts %{*WARN* is the file or directory writable? could not create #{filename}}
end
end
- def commit_v_current
- versioninfo= <<-WOK
----
-: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.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_)
+ def self.update_stable
+ version_info_update_commit(Version_info::Current.file_stable,Version_info::Current.setting_stable,Version_info::Current.content_stable,Version_info::Next.setting_stable,Version_info::Next.content_stable)
end
- def commit_v_next
- versioninfo= <<-WOK
----
-: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]}
+ def self.update_unstable
+ version_info_update_commit(Version_info::Current.file_unstable,Version_info::Current.setting_unstable,Version_info::Current.content_unstable,Version_info::Next.setting_unstable,Version_info::Next.content_unstable)
+ end
+ def self.changelog_header(vi)
+ <<-WOK
+%% #{vi[:version]}.orig.tar.xz (#{vi[:date]}:#{vi[:date_stamp].gsub(/20\d\dw/,'')})
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_#{vi[:version]}
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_#{vi[:version]}-1
+http://www.jus.uio.no/sisu/pkg/src/sisu_#{vi[:version]}.orig.tar.xz
+ sisu_#{vi[:version]}.orig.tar.xz
+ sisu_#{vi[:version]}-1.dsc
WOK
- 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 v_current
- <<-WOK
-%% #{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 v_next
- <<-WOK
-%% #{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
end
- self
+ def self.changelog_header_stable
+ changelog_header(Version_info::Current.setting_stable)
+ end
+ def self.changelog_header_unstable
+ changelog_header(Version_info::Current.setting_unstable)
+ end
end
self
end
-def version_update_manual
- puts 'date: ' + `date "+%Y-%m-%d"`
- puts 'date_stamp: ' + `date "+%Yw%W/%u"`
-end
-def gemspecs
- def sisu_info_current
+module Gemspecs
+ def self.info(vi)
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]}
+name: #{vi[:project].downcase}
+version: #{vi[:version]}
+date: #{vi[:date]}
+summary: #{vi[:project]}
WOK
end
- def sisu_yml_current
+ def self.contents(vi,version)
<<-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.name = '#{vi[:project].downcase}'
+ s.version = '#{vi[:version]}'
+ s.date = '#{vi[:date]}'
+ s.summary = '#{vi[: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'] +
+ s.files = Dir['lib/sisu/#{version}/*.rb'] +
+ Dir['data/sisu/#{version}sv/version.yml'] +
Dir['bin/sisugem'] +
Dir['bin/sisu']
s.license = 'GPL3'
@@ -369,74 +362,8 @@ Gem::Specification.new do |s|
end
WOK
end
- def sisu_manual_setting_current
- <<-WOK
-Gem::Specification.new do |s|
- 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/#{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_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.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/#{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'
- s.executables << 'sisugem' << 'sisu'
-end
- WOK
- end
- def gemspec_create(filename,gemspec)
- fn="#{Dir.pwd}/#{filename}"
+ def self.create(filename,gemspec)
+ fn="#{Dir.pwd}/#{filename}.gemspec"
if File.writable?("#{Dir.pwd}/.")
file_sisu_gemspec=File.new(fn,'w+')
file_sisu_gemspec << gemspec
@@ -445,128 +372,151 @@ end
puts %{*WARN* is the file or directory writable? could not create #{filename}}
end
end
- 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 sisu_filename_manual_current
- "sisu-#{sisu_version_info.set.manual_setting_v_current[:version]}"
- end
- def sisu_filename_manual_next
- "sisu-#{sisu_version_info.set.manual_setting_v_next[:version]}"
- end
- 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 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})
+ def self.build(fn)
+ system(%{ gem build #{fn}.gemspec })
end
- def sisu_build_manual_next
- system(%{ gem build #{sisu_filename_manual_next}.gemspec})
- end
- def sisu_install_current
+ def self.install(fn)
system(%{
- sudo gem install --no-rdoc --no-ri --verbose sisu-#{sisu_version_info.yml_setting_v_current[:version]}.gem
+ sudo gem install --no-rdoc --no-ri --verbose #{fn}.gem
})
end
- def sisu_install_next
- system(%{
- 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
- })
+ module Current
+ def self.filename_stable
+ "sisu-#{Version_info::Current.setting_stable[:version]}"
+ end
+ def self.filename_unstable
+ "sisu-#{Version_info::Current.setting_unstable[:version]}"
+ end
+ def self.info_stable
+ Gemspecs.info(Version_info::Current.setting_stable)
+ end
+ def self.info_unstable
+ Gemspecs.info(Version_info::Current.setting_unstable)
+ end
+ def self.current_stable
+ Gemspecs.contents(Version_info::Current.setting_stable,SiSU_version_dir_stable)
+ end
+ def self.current_unstable
+ Gemspecs.contents(Version_info::Current.setting_unstable,SiSU_version_dir_unstable)
+ end
+ def self.create_stable
+ Gemspecs.create(filename_stable,current_stable)
+ Gemspecs.create('sisu-stable',current_stable)
+ end
+ def self.create_unstable
+ Gemspecs.create(filename_unstable,current_unstable)
+ Gemspecs.create('sisu-unstable',current_unstable)
+ end
+ def self.build_stable
+ Gemspecs.build(filename_stable)
+ end
+ def self.build_unstable
+ Gemspecs.build(filename_unstable)
+ end
+
+ def self.install_stable
+ Gemspecs.install(filename_stable)
+ end
+ def self.install_unstable
+ Gemspecs.install(filename_unstable)
+ end
end
- def sisu_install_manual_next
- system(%{
- sudo gem install --no-rdoc --no-ri --verbose #{sisu_filename_manual_next}.gem
- })
+ module Next
+ def self.filename_stable
+ "sisu-#{Version_info::Next.setting_stable[:version]}"
+ end
+ def self.filename_unstable
+ "sisu-#{Version_info::Next.setting_unstable[:version]}"
+ end
+ def self.setting_stable
+ Gemspecs.contents(Version_info::Next.setting_stable,SiSU_version_dir_stable)
+ end
+ def self.setting_unstable
+ Gemspecs.contents(Version_info::Next.setting_unstable,SiSU_version_dir_unstable)
+ end
+ def self.create_stable
+ Gemspecs.create(filename_stable,setting_stable)
+ end
+ def self.create_unstable
+ Gemspecs.create(filename_unstable,setting_unstable)
+ end
+ def self.build_stable
+ Gemspecs.build(filename_stable)
+ end
+ def self.build_unstable
+ Gemspecs.build(filename_unstable)
+ end
+ def self.install_stable
+ Gemspecs.install(filename_stable)
+ end
+ def self.install_unstable
+ Gemspecs.install(filename_unstable)
+ end
end
- self
end
-def project_help
- puts <<WOK
+module Help
+ def self.project_help
+ puts <<WOK
-#{@p.name}
- #{@p.rake_rant}
- #{@p.platform_notice}
+#{Project_details.name}
+ #{Project_details.rake_rant}
+ #{Project_details.platform_notice}
Commands quick start list
- #{@p.name} Rake/Rant Help: (Rakefile or Rantfile)
+ #{Project_details.name} Rake/Rant Help: (Rakefile or Rantfile)
rake -T or rant -T # a task list, (generated by Rake or Rant) for more complete and up to date help
rake system or rant system # system info used
- Quick start install and remove project #{@p.name}
+ Quick start install and remove project #{Project_details.name}
as root:
- rake or rant # install #{@p.name}
+ rake or rant # install #{Project_details.name}
rake base
- rake setup # install #{@p.name} (larger install)
+ rake setup # install #{Project_details.name} (larger install)
- rake install # reinstall #{@p.name}
+ rake install # reinstall #{Project_details.name}
- rake remove # clobber/remove #{@p.name}, current version: #{@p.version}
- rake remove_package # clobber/remove #{@p.name}, all versions
+ rake remove # clobber/remove #{Project_details.name}, stable version: #{Project_details.version}
+ rake remove_package # clobber/remove #{Project_details.name}, all versions
For a more detailed and up to date list of command options use:
rake -T
rant -T
WOK
-end
-def tasks
- system('rake -T')
+ end
+ def self.tasks(make='rake')
+ begin
+ system("#{make} -T")
+ rescue
+ puts 'is either rake or rant installed?'
+ end
+ end
end
#% tasks
-desc "rake/rant sisu install (as root type 'rake' or 'rant')"
-task :default => [:default_notice,:setup_base]
-#task :default => [:help,:notice,:project]
-desc "Setup/Install #{@p.name} and try generate a file"
+desc "rake/rant tasks for sisu install, and create gem)"
+task :default => [:tasks] #[:default_notice,:setup_base]
+desc "Setup/Install #{Project_details.name} and try generate a file"
task :project=> [:setup_bin,:setup_lib,:setup_conf,:setup_share,:setup_data,:setup_man,:setup_vim,:post_install_note]
-desc "Setup/Install #{@p.name}"
+desc "Setup/Install #{Project_details.name}"
task :setup=> [:setup_bin, :setup_lib,:setup_conf,:setup_share,:setup_data] #, :help]
-desc "Setup/Install #{@p.name}: bin, lib and conf (no data)"
+desc "Setup/Install #{Project_details.name}: bin, lib and conf (no data)"
task :setup_base=> [:setup_bin,:setup_lib,:setup_conf,:setup_share,:setup_man,:setup_vim]
-desc "Setup/Install #{@p.name} bin, lib and conf (no data and no attempt to do postinstall setup)"
+desc "Setup/Install #{Project_details.name} bin, lib and conf (no data and no attempt to do postinstall setup)"
task :base=> [:setup_base]
desc "check package version"
task :sisuversion => [:sisu_version]
desc "set package version"
-task :sisuversionset => [:sisu_version_set]
+task :sisuversionset => [:sisu_version_set,:changelog_headers]
desc "check gemspec info"
task :gemspec => [:gemspec_info]
-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 sisu v_stable gemspec"
+task :gem4cs => [:gemspecs_stable_create_default_version]
+task :gem4createspecs => [:gemspecs_stable_create_default_version]
+desc "create sisu v_unstable gemspec"
+task :gem5cs => [:gemspecs_unstable_create_default_version]
+task :gem5createspecs => [:gemspecs_unstable_create_default_version]
desc "create gemspec"
task :gemcs => [:gemspecs_create_default_version]
task :gemc => [:gemspecs_create_default_version]
@@ -575,150 +525,150 @@ 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 "build sisu v_stable gem"
+task :gem4b => [:gem_stable_build]
+task :gem4build => [:gem_stable_build]
+desc "build sisu v_unstable gem"
+task :gem5b => [:gem_unstable_build]
+task :gem5build => [:gem_unstable_build]
desc "install gem"
task :gemi => [:gem_install]
task :geminstall => [: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 sisu v_stable gem"
+task :gem4bi => [:gem_stable_build,:gem_install]
+desc "build & install sisu v_unstable gem"
+task :gem5bi => [:gem_unstable_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"
+desc "create, build & install sisu v_stable gem"
+task :gem4cbi => [:gemspecs_stable_create_default_version,:gem_stable_build,:gem_stable_install]
+desc "create, build & install sisu v_unstable gem"
+task :gem5cbi => [:gemspecs_unstable_create_default_version,:gem_unstable_build,:gem_unstable_install]
+desc "create, build & install sisu v_stable & v_unstable 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 sisu v_stable gemspec, manually set version"
+task :gem4csm => [:gemspecs_stable_create_manual_version]
+desc "create sisu v_unstable gemspec, manually set version"
+task :gem5csm => [:gemspecs_unstable_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 "build sisu v_stable gem"
+task :gem4bm => [:gem_stable_build_manual_version]
+desc "build sisu v_unstable gem"
+task :gem5bm => [:gem_unstable_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 sisu v_stable gem"
+task :gem4bim => [:gem_stable_build_manual_version,:gem_install_manual_version]
+desc "build & install sisu v_unstable gem"
+task :gem5bim => [:gem_unstable_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"
+desc "create, build & install sisu v_stable gem"
+task :gem4cbim => [:gemspecs_stable_create_manual_version,:gem_stable_build_manual_version,:gem_stable_install_manual_version]
+desc "create, build & install sisu v_unstable gem"
+task :gem5cbim => [:gemspecs_unstable_create_manual_version,:gem_unstable_build_manual_version,:gem_unstable_install_manual_version]
+desc "create, build & install sisu v_stable & v_unstable 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
- desc "Setup #{@p.name} bin only, synonym :bin"
+if File.directory?('bin')
+ desc "Setup #{Project_details.name} bin only, synonym :bin"
task :bin => [:setup_bin]
end
-if File.directory?('lib') #lib
- desc "Setup #{@p.name} lib only, synonym :lib"
+if File.directory?('lib')
+ desc "Setup #{Project_details.name} lib only, synonym :lib"
task :lib => [:setup_lib]
end
-if File.directory?('conf') #conf or etc
- desc "Setup #{@p.name} conf only, synonyms :conf & :etc"
+if File.directory?('conf')
+ desc "Setup #{Project_details.name} conf only, synonyms :conf & :etc"
task :conf => [:setup_conf]
task :setup_etc => [:setup_conf]
task :etc => [:setup_conf]
end
-if File.directory?('data') #data
- desc "Setup #{@p.name} data only, synonyms :data & :examples"
+if File.directory?('data')
+ desc "Setup #{Project_details.name} data only, synonyms :data & :examples"
task :data => [:setup_data]
task :setup_examples => [:setup_data]
task :examples => [:setup_data]
end
-if File.directory?('data/sisu') #share (odf shared-images)
- desc "Setup #{@p.name} shared data only (odf & shared images)"
+if File.directory?('data/sisu')
+ desc "Setup #{Project_details.name} shared data only (odf & shared images)"
task :share => [:setup_share]
end
-if File.directory?('man') #man pages
- desc "Setup #{@p.name} man pages only, synonyms :man"
+if File.directory?('man')
+ desc "Setup #{Project_details.name} man pages only, synonyms :man"
task :man => [:setup_man]
end
-if File.directory?('data/vim') #man pages
- desc "Setup #{@p.name} vim config files only, synonyms :vim"
+if File.directory?('data/vim')
+ desc "Setup #{Project_details.name} vim config files only, synonyms :vim"
task :setup_vim => [:setup_vim]
task :vim => [:setup_vim]
end
-desc "Setup/Install #{@p.name}: bin, lib, conf and data (no attempt to do postinstall setup)"
+desc "Setup/Install #{Project_details.name}: bin, lib, conf and data (no attempt to do postinstall setup)"
task :setup_only=> [:setup_bin,:setup_lib,:setup_conf,:setup_share,:setup_data,:help]
-desc "Remove #{@p.name} (all versions)" #remove project
+desc "Remove #{Project_details.name} (all versions)"
task :remove_package => [:remove_bin, :remove_lib, :remove_conf]
-if File.directory?('bin') #bin
- desc "Remove #{@p.name} bin only" #remove bin
+if File.directory?('bin')
+ desc "Remove #{Project_details.name} bin only"
task :remove_bin => [:remove_bin]
end
-if File.directory?('lib') #lib
- desc "Remove #{@p.name} lib only" #remove lib
+if File.directory?('lib')
+ desc "Remove #{Project_details.name} lib only"
task :remove_lib => [:remove_lib]
end
-if File.directory?('conf') #conf
- desc "Remove #{@p.name} conf only" #remove conf
+if File.directory?('conf')
+ desc "Remove #{Project_details.name} conf only"
task :remove_conf => [:remove_conf]
end
-desc "Re-setup #{@p.name}, synonym :reinstall" #resetup reinstall
+desc "Re-setup #{Project_details.name}, synonym :reinstall"
task :resetup => [:remove, :setup]
task :reinstall => [:remove, :setup]
-desc "Re-setup #{@p.name}: bin, lib, conf (ignore data), synonym :reinstall" #partial reinstall
+desc "Re-setup #{Project_details.name}: bin, lib, conf (ignore data), synonym :reinstall"
task :resetup_base => [:remove, :setup_base]
task :reinstall_base => [:remove, :setup_base]
-if File.directory?('bin') #bin
- desc "Re-setup #{@p.name} bin, synonym :reinstall"
+if File.directory?('bin')
+ desc "Re-setup #{Project_details.name} bin, synonym :reinstall"
task :resetup_bin => [:remove_bin, :setup_bin]
task :reinstall_bin => [:remove_bin, :setup_bin]
end
-if File.directory?('lib') #lib
- desc "Re-setup #{@p.name} lib, synonym :reinstall_lib"
+if File.directory?('lib')
+ desc "Re-setup #{Project_details.name} lib, synonym :reinstall_lib"
task :resetup_lib => [:remove_lib, :setup_lib]
task :reinstall_lib => [:remove_lib, :setup_lib]
end
-if File.directory?('conf') #conf
- desc "Re-setup #{@p.name} conf, synonyms :reinstall_conf & :resetup_etc"
+if File.directory?('conf')
+ desc "Re-setup #{Project_details.name} conf, synonyms :reinstall_conf & :resetup_etc"
task :resetup_conf => [:remove_conf, :setup_conf]
task :reinstall_conf => [:remove_conf, :setup_conf]
task :resetup_etc => [:remove_conf, :setup_conf]
task :reinstall_etc => [:remove_conf, :setup_conf]
end
-if File.directory?('data/sisu') #share
- desc "Re-setup #{@p.name} shared data, (odf & images)"
+if File.directory?('data/sisu')
+ desc "Re-setup #{Project_details.name} shared data, (odf & images)"
task :resetup_share => [:remove_share, :setup_share]
task :reinstall_share => [:remove_share, :setup_share]
end
-if File.directory?('man') #man
- desc "Re-setup #{@p.name} man, synonym :reinstall_man"
+if File.directory?('man')
+ desc "Re-setup #{Project_details.name} man, synonym :reinstall_man"
task :resetup_man => [:remove_man, :setup_man]
task :reinstall_man => [:remove_man, :setup_man]
end
desc 'Setup Note'
task :setup_note => [:help]
-desc "System information used by #{@p.name}"
+desc "System information used by #{Project_details.name}"
task :system => [:system_info,:project_help,:post_install_note]
desc "show all system info available - parameters found"
task :system_param => [:system_param]
desc 'Help'
task :help => [:project_help,:system_info,:tasks]
-#desc "Setup/Install #{@p.name} (uses filelist)"
+#desc "Setup/Install #{Project_details.name} (uses filelist)"
task :install => [:default_notice,:project]
task :install_bin => [:setup_bin]
#%% setup/install tasks
@@ -726,7 +676,7 @@ task :rant_independence do #notice
resp=''
while resp.length < 4
resp='sisu-install' #default name install
- print %{#{@p.rake_rant}
+ print %{#{Project_details.rake_rant}
Create a rant dependency independent file
provide filename default name is "install"
[Warning, will overwrite file of name provided
@@ -743,155 +693,151 @@ task :rant_independence do #notice
end
task :default_notice do #notice
- default_notice
+ Utils.default_notice
end
task :default2 do #secondary
- setup_find_cp_r('bin',@p.dir.bin) if File.directory?('bin')
- setup_find_cp_r('lib',@p.dir.lib) if File.directory?('lib')
- setup_find_cp_r('conf',@p.dir.conf) if File.directory?('conf')
- setup_find_cp_r('data/sisu',@p.dir.share) if File.directory?('data/sisu') #
- setup_find_cp_r('data',@p.dir.data) if File.directory?('data')
- setup_find_cp_r('data/vim',"#{@p.dir.data}/vim") if File.directory?('data/vim')
- setup_find_cp_r('man',@p.dir.man) if File.directory?('man')
-end
-task :setup_bin do #bin
+ setup_find_cp_r('bin',Project_details.dir.bin) if File.directory?('bin')
+ setup_find_cp_r('lib',Project_details.dir.lib) if File.directory?('lib')
+ setup_find_cp_r('conf',Project_details.dir.conf) if File.directory?('conf')
+ setup_find_cp_r('data/sisu',Project_details.dir.share) if File.directory?('data/sisu') #
+ setup_find_cp_r('data',Project_details.dir.data) if File.directory?('data')
+ setup_find_cp_r('data/vim',"#{Project_details.dir.data}/vim") if File.directory?('data/vim')
+ setup_find_cp_r('man',Project_details.dir.man) if File.directory?('man')
+end
+task :setup_bin do
exclude_files=['sisugem']
- setup_find_create('bin',@p.dir.bin,exclude_files) if File.directory?('bin')
+ Install.setup_find_create('bin',Project_details.dir.bin,exclude_files) if File.directory?('bin')
end
-task :setup_lib do #lib
- setup_find_create('lib',@p.dir.lib) if File.directory?('lib')
+task :setup_lib do
+ Install.setup_find_create('lib',Project_details.dir.lib) if File.directory?('lib')
end
-task :setup_conf do #conf
- setup_find_create('conf',@p.dir.conf) if File.directory?('conf')
+task :setup_conf do
+ Install.setup_find_create('conf',Project_details.dir.conf) if File.directory?('conf')
end
-task :setup_share do #share
- setup_find_create('data/sisu',@p.dir.share) if File.directory?('data/sisu')
+task :setup_share do
+ Install.setup_find_create('data/sisu',Project_details.dir.share) if File.directory?('data/sisu')
end
-task :setup_data do #data
- setup_find_create('data',@p.dir.data) if File.directory?('data')
+task :setup_data do
+ Install.setup_find_create('data',Project_details.dir.data) if File.directory?('data')
end
-task :setup_man do #man
- setup_find_create('man',@p.dir.man) if File.directory?('man') #man pages
- setup_find_create('man.deb/man',@p.dir.man) if File.directory?('man.deb/man') #man pages
+task :setup_man do
+ Install.setup_find_create('man',Project_details.dir.man) if File.directory?('man')
+ Install.setup_find_create('man.deb/man',Project_details.dir.man) if File.directory?('man.deb/man')
end
-task :setup_vim do #man
- setup_find_create('data/vim',@p.dir.vim) if File.directory?('data/vim') #man pages
+task :setup_vim do
+ Install.setup_find_create('data/vim',Project_details.dir.vim) if File.directory?('data/vim')
end
-task :gemspec_info do #man
- version_update_manual
- gemspecs.sisu_info_current
- gemspecs.sisu_info_next
+task :gemspec_info do
+ Gemspecs.info_stable
+ Gemspecs.info_unstable
end
-task :gemspecs_current_create_default_version do #man
- gemspecs.sisu_gemspec_create_current
+task :gemspecs_stable_create_default_version do
+ Gemspecs::Current.create_stable
end
-task :gemspecs_next_create_default_version do #man
- gemspecs.sisu_gemspec_create_next
+task :gemspecs_unstable_create_default_version do
+ Gemspecs::Current.create_unstable
end
-task :gemspecs_create_default_version do #man
- gemspecs.sisu_gemspec_create_current
- gemspecs.sisu_gemspec_create_next
+task :gemspecs_create_default_version do
+ Gemspecs::Current.create_stable
+ Gemspecs::Current.create_unstable
end
-task :gemspecs_current_create_manual_version do #man
- gemspecs.sisu_gemspec_create_manual_version_current
+task :gemspecs_stable_create_manual_version do
+ Gemspecs::Next.create_stable
end
-task :gemspecs_next_create_manual_version do #man
- gemspecs.sisu_gemspec_create_manual_version_next
+task :gemspecs_unstable_create_manual_version do
+ Gemspecs::Next.create_unstable
end
-task :gemspecs_create_manual_version do #man
- gemspecs.sisu_gemspec_create_manual_version_current
- gemspecs.sisu_gemspec_create_manual_version_next
+task :gemspecs_create_manual_version do
+ Gemspecs::Next.create_stable
+ Gemspecs::Next.create_unstable
end
-task :gem_current_build do #man
- gemspecs.sisu_build_current
+task :gem_stable_build do
+ Gemspecs::Current.build_stable
end
-task :gem_next_build do #man
- gemspecs.sisu_build_next
+task :gem_unstable_build do
+ Gemspecs::Current.build_unstable
end
-task :gem_build do #man
- gemspecs.sisu_build_current
- gemspecs.sisu_build_next
+task :gem_build do
+ Gemspecs::Current.build_stable
+ Gemspecs::Current.build_unstable
end
-task :gem_current_build_manual_version do #man
- gemspecs.sisu_build_manual_current
+task :gem_stable_build_manual_version do
+ Gemspecs::Next.build_stable
end
-task :gem_next_build_manual_version do #man
- gemspecs.sisu_build_manual_next
+task :gem_unstable_build_manual_version do
+ Gemspecs::Next.build_unstable
end
-task :gem_build_manual_version do #man
- gemspecs.sisu_build_manual_current
- gemspecs.sisu_build_manual_next
+task :gem_build_manual_version do
+ Gemspecs::Next.build_stable
+ Gemspecs::Next.build_unstable
end
-task :gem_current_install do #man
- gemspecs.sisu_install_current
+task :gem_stable_install do
+ Gemspecs::Current.install_stable
end
-task :gem_next_install do #man
- gemspecs.sisu_install_next
+task :gem_unstable_install do
+ Gemspecs::Current.install_unstable
end
-task :gem_install do #man
- gemspecs.sisu_install_current
- gemspecs.sisu_install_next
+task :gem_install do
+ Gemspecs::Current.install_stable
+ Gemspecs::Current.install_unstable
end
-task :gem_current_install_manual_version do #man
- gemspecs.sisu_install_manual_current
+task :gem_stable_install_manual_version do
+ Gemspecs::Next.install_stable
end
-task :gem_next_install_manual_version do #man
- gemspecs.sisu_install_manual_next
+task :gem_unstable_install_manual_version do
+ Gemspecs::Next.install_unstable
end
-task :gem_install_manual_version do #man
- gemspecs.sisu_install_manual_current
- gemspecs.sisu_install_next
+task :gem_install_manual_version do
+ Gemspecs::Next.install_stable
+ Gemspecs::Next.install_unstable
end
-task :changelog_headers do #man
+task :changelog_headers do
puts '---'
- puts sisu_version_info.set.changelog_header.v_current
+ puts Version_info::Update.changelog_header_stable
+ puts '---'
+ puts Version_info::Update.changelog_header_unstable
+end
+task :sisu_version do
+ puts Version_info::Next.setting_stable
+ puts Version_info::Next.setting_unstable
puts '---'
- puts sisu_version_info.set.changelog_header.v_next
-end
-task :sisu_version do #man
- 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.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 Version_info::Current.setting_stable[:project]
+ puts Version_info::Current.setting_stable[:version]
+ puts Version_info::Current.setting_stable[:date]
+ puts Version_info::Current.setting_stable[:date_stamp]
puts '---'
- 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]
+ puts Version_info::Current.setting_unstable[:project]
+ puts Version_info::Current.setting_unstable[:version]
+ puts Version_info::Current.setting_unstable[:date]
+ puts Version_info::Current.setting_unstable[:date_stamp]
end
-task :sisu_version_set do #man
- sisu_version_info.set.commit_v_current
- sisu_version_info.set.commit_v_next
+task :sisu_version_set do
+ Version_info::Update.update_stable
+ Version_info::Update.update_unstable
end
#%% post install
#%% clobber/remove tasks
task :remove_bin do
- rm_r "#{@p.dir.bin}/#{@p.dir.proj}" if FileTest.file?("#{@p.dir.bin}/#{@p.dir.proj}")
+ rm_r "#{Project_details.dir.bin}/#{Project_details.dir.proj}" if FileTest.file?("#{Project_details.dir.bin}/#{Project_details.dir.proj}")
end
task :remove_lib do
- rm_r "#{@p.dir.lib}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.lib}/#{@p.dir.proj}")
+ rm_r "#{Project_details.dir.lib}/#{Project_details.dir.proj}" if FileTest.directory?("#{Project_details.dir.lib}/#{Project_details.dir.proj}")
end
task :remove_conf do
- rm_r "#{@p.dir.conf}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.conf}/#{@p.dir.proj}")
+ rm_r "#{Project_details.dir.conf}/#{Project_details.dir.proj}" if FileTest.directory?("#{Project_details.dir.conf}/#{Project_details.dir.proj}")
end
task :remove_man do
- rm_r "#{@p.dir.man}/**/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.man}/man1/#{@p.dir.proj}")
+ rm_r "#{Project_details.dir.man}/**/#{Project_details.dir.proj}" if FileTest.directory?("#{Project_details.dir.man}/man1/#{Project_details.dir.proj}")
end
task :remove_version do
- rm_r "#{@p.dir.bin}/#{@p.dir.proj}" if FileTest.file?("#{@p.dir.bin}/#{@p.dir.proj}")
- rm_r "#{@p.dir.lib}/#{@p.dir.proj}/#{@p.version}" if FileTest.directory?("#{@p.dir.lib}/#{@p.dir.proj}/#{@p.version}")
- rm_r "#{@p.dir.conf}/#{@p.dir.proj} if FileTest.directory?("#{@p.dir.conf}/#{@p.dir.proj}")
+ rm_r "#{Project_details.dir.bin}/#{Project_details.dir.proj}" if FileTest.file?("#{Project_details.dir.bin}/#{Project_details.dir.proj}")
+ rm_r "#{Project_details.dir.lib}/#{Project_details.dir.proj}/#{Project_details.version}" if FileTest.directory?("#{Project_details.dir.lib}/#{Project_details.dir.proj}/#{Project_details.version}")
+ rm_r "#{Project_details.dir.conf}/#{Project_details.dir.proj} if FileTest.directory?("#{Project_details.dir.conf}/#{Project_details.dir.proj}")
end
task :remove_package do
- rm_r "#{@p.dir.bin}/#{@p.dir.proj}" if FileTest.file?("#{@p.dir.bin}/#{@p.dir.proj}")
- rm_r "#{@p.dir.lib}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.lib}/#{@p.dir.proj}")
- rm_r "#{@p.dir.conf}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.conf}/#{@p.dir.proj}")
+ rm_r "#{Project_details.dir.bin}/#{Project_details.dir.proj}" if FileTest.file?("#{Project_details.dir.bin}/#{Project_details.dir.proj}")
+ rm_r "#{Project_details.dir.lib}/#{Project_details.dir.proj}" if FileTest.directory?("#{Project_details.dir.lib}/#{Project_details.dir.proj}")
+ rm_r "#{Project_details.dir.conf}/#{Project_details.dir.proj}" if FileTest.directory?("#{Project_details.dir.conf}/#{Project_details.dir.proj}")
end
task :post_install_note do
puts <<WOK
@@ -905,15 +851,16 @@ task :post_install_note do
WOK
end
-task :system_info do #%% system info
- system_info
+ #%% help & system info
+task :system_info do
+ Project_details.system_info
end
task :system_param do
@env.each {|c| puts c.inspect }
end
-task :project_help do #%% help
- project_help
+task :project_help do
+ Help.project_help
end
-task :tasks do #%% help
- tasks
+task :tasks do
+ Help.tasks
end