aboutsummaryrefslogtreecommitdiffhomepage
path: root/setup
diff options
context:
space:
mode:
Diffstat (limited to 'setup')
-rw-r--r--setup/qi_libs.rb243
-rw-r--r--setup/qi_libs_base.rb31
-rw-r--r--setup/rbuild80
-rw-r--r--setup/rbuild_libs.rb145
-rw-r--r--setup/sisu_version.rb6
5 files changed, 148 insertions, 357 deletions
diff --git a/setup/qi_libs.rb b/setup/qi_libs.rb
index 938724a0..6dc2fcfa 100644
--- a/setup/qi_libs.rb
+++ b/setup/qi_libs.rb
@@ -6,10 +6,10 @@ module Project_details
'SiSU'
end
def self.summary
- 'documents - structuring, publishing in multiple formats and search'
+ 'documents - structuring, publishing in multiple formats & search'
end
def self.description
- 'documents - structuring, publishing in multiple formats and search'
+ 'documents - structuring, publishing in multiple formats & search'
end
def self.homepage
'http://www.sisudoc.org'
@@ -244,15 +244,9 @@ module Version_info
? (%{#{vi[:version_number]} from git #{Version_info.version_number_use(vi)}})
: vi[:version_number]
end
- def self.version_number_info_unstable
- vi=Version_info::Current.setting_unstable
- (Version_info.version_number_use(vi) != vi[:version_number]) \
- ? (%{#{vi[:version_number]} from git #{Version_info.version_number_use(vi)}})
- : vi[:version_number]
- end
module Current
- def self.yml_file_path(version)
- "data/sisu/version/#{version}.yml"
+ def self.yml_file_path
+ 'data/sisu/version.yml'
end
def self.settings(file)
v="#{Dir.pwd}/#{file}"
@@ -262,16 +256,10 @@ module Version_info
end
end
def self.changelog_file_stable
- 'data/doc/sisu/CHANGELOG_v5'
- end
- def self.changelog_file_unstable
- 'data/doc/sisu/CHANGELOG_v6'
+ 'data/doc/sisu/CHANGELOG_v7'
end
def self.file_stable
- yml_file_path(SiSU_version_dir_stable)
- end
- def self.file_unstable
- yml_file_path(SiSU_version_dir_unstable)
+ yml_file_path
end
def self.setting_stable
hsh=settings(file_stable)
@@ -279,18 +267,9 @@ module Version_info
match(hsh[:version])[1]
hsh
end
- def self.setting_unstable
- hsh=settings(file_unstable)
- hsh[:version_number]=/([0-9]+\.[0-9]+\.[0-9]+)/.
- match(hsh[:version])[1]
- hsh
- 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)
@@ -304,15 +283,9 @@ module Version_info
def self.setting_stable
settings(SiSU_version_next_stable)
end
- def self.setting_unstable
- settings(SiSU_version_next_unstable)
- end
def self.content_stable(rel)
Version_info.contents(setting_stable,rel)
end
- def self.content_unstable(rel)
- Version_info.contents(setting_unstable,rel)
- end
end
module Update
def self.version_number(vi)
@@ -344,6 +317,32 @@ proceed? }
end
end
end
+ def self.update_documentation
+ fn="#{Dir.pwd}/data/doc/sisu/markup-samples/manual/_sisu/sisu_document_make"
+ if File.file?(fn) \
+ and File.writable?(fn)
+ ver_no_stable=Version_info::Current.setting_stable[:version_number]
+ debian_stable='Jessie'
+ debian_testing='Stretch'
+ sisu_doc_make = IO.readlines(fn)
+ sisu_doc_make_next=sisu_doc_make.each.map do |line|
+ line=line.gsub(/(\/$\{sisu_stable\}\/,)'[0-9]+\.[0-9]+\.[0-9]+'/,"\\1'#{ver_no_stable}'").
+ gsub(/(\/$\{debian_stable\}\/,)'\*\{[A-Z][a-z]+\}\*'/,
+ "\\1'*{#{debian_stable}}*'").
+ gsub(/(\/$\{debian_testing\}\/,)'\*\{[A-Z][a-z]+\}\*'/,
+ "\\1'*{#{debian_testing}}*'")
+ line
+ end
+ if sisu_doc_make_next.length == sisu_doc_make.length
+ sisu_doc_make_file=File.new(fn,'w+')
+ sisu_doc_make_next.flatten.each do |line|
+ sisu_doc_make_file << line
+ end
+ sisu_doc_make_file.close
+ else puts "expected changelog arrays to have same length, in: #{pkgbuild.length}, out: #{pkgbuild_next.length}"
+ end
+ end
+ end
def self.update_stable(rel=:release)
version_info_update_commit(
Version_info::Current.file_stable,
@@ -353,14 +352,34 @@ proceed? }
Version_info::Next.content_stable(rel),
)
end
- def self.update_unstable(rel=:release)
- 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(rel),
- )
+ def self.update_pkgbuild_stable(rel=:release)
+ vn=version_number_stable
+ ans=%{update PKGBUILD version info:
+pkgver=#{vn}
+
+proceed? }
+ resp=Utils.answer?(ans)
+ if resp
+ filename='PKGBUILD_tar_xz'
+ fn="#{Dir.pwd}/setup/#{filename}"
+ if File.writable?(fn)
+ pkgbuild = IO.readlines(fn)
+ pkgbuild_next=pkgbuild.each.map do |line|
+ if line =~/^\s*pkgver=/
+ line=line.gsub(/^\s*(pkgver=)[0-9.]+/,"\\1#{vn}")
+ else line
+ end
+ end
+ if pkgbuild.length == pkgbuild_next.length
+ pkgbuild_file=File.new(fn,'w+')
+ pkgbuild_next.flatten.each do |line|
+ pkgbuild_file << line
+ end
+ pkgbuild_file.close
+ else puts "expected changelog arrays to have same length, in: #{pkgbuild.length}, out: #{pkgbuild_next.length}"
+ end
+ end
+ end
end
def self.changelog_header(vi)
vn=version_number(vi)
@@ -404,9 +423,6 @@ proceed? }
def self.changelog_header_stable_filename
Version_info::Current.changelog_file_stable
end
- def self.changelog_header_unstable_filename
- Version_info::Current.changelog_file_unstable
- end
def self.changelog_header_stable
ch=changelog_header(Version_info::Current.setting_stable)
changelog_header_release(
@@ -415,14 +431,6 @@ proceed? }
Version_info::Current.setting_stable
)
end
- def self.changelog_header_unstable
- ch=changelog_header(Version_info::Current.setting_unstable)
- changelog_header_release(
- changelog_header_unstable_filename,
- ch,
- Version_info::Current.setting_unstable
- )
- end
def self.changelog_header_pre_release(vi)
vn=version_number(vi)
<<-WOK
@@ -465,10 +473,6 @@ proceed? }
ch=changelog_header_pre_release(Version_info::Current.setting_stable)
changelog_header_pre_release_write(changelog_header_stable_filename,ch)
end
- def self.changelog_header_unstable_pre_release
- ch=changelog_header_pre_release(Version_info::Current.setting_unstable)
- changelog_header_pre_release_write(changelog_header_unstable_filename,ch)
- end
def self.commit_changelog(rel=:release,msg)
system(%{
git commit -a -m"#{msg}"
@@ -521,16 +525,14 @@ module GitExtractTaggedVersionBuild
begin
ver=if tag =~/sisu_[0-9]\.[0-9]+\.[0-9]+/ then tag
elsif tag =~/^[0-9]\.[0-9]+\.[0-9]+/ then 'sisu_' + tag
- else branch
+ else branch
end
- stable=options[:stable] ? '--stable ' : ''
- unstable=options[:unstable] ? '--unstable ' : ''
create=options[:create] ? '--create ' : ''
build=options[:build] ? '--build ' : ''
install=options[:install] ? '--install ' : ''
commands =<<-WOK
git checkout #{ver} &&
- #{$called_as} gem #{ver} #{stable}#{unstable}#{create}#{build}#{install};
+ #{$called_as} gem #{ver} #{create}#{build}#{install};
WOK
puts commands
begin
@@ -555,20 +557,43 @@ date: #{vi[:date]}
summary: #{vi[:project]}
WOK
end
- def self.contents(vi,branch)
+ def self.contents(vi)
<<-WOK
Gem::Specification.new do |s|
s.name = '#{vi[:project].downcase}'
s.version = '#{vi[:version_number]}'
+ s.date = '#{vi[:date]}'
+ s.summary = '#{Project_details.summary} (linux calls)'
+ s.description = '#{Project_details.description} [#{Version_info.version_number_info(vi)}] (linux calls & without external dependencies)'
+ s.homepage = '#{Project_details.homepage}'
s.authors = ["Ralph Amissah"]
s.email = 'ralph.amissah@gmail.com'
+ s.license = 'GPL3'
+ s.files = Dir['lib/#{Project_details.name.downcase}.rb'] +
+ Dir['lib/#{Project_details.name.downcase}/*.rb'] +
+ Dir['data/#{Project_details.name.downcase}/version.yml'] +
+ Dir['data/#{Project_details.name.downcase}/image/*'] +
+ Dir['bin/#{Project_details.name.downcase}gem'] +
+ Dir['bin/#{Project_details.name.downcase}']
+ s.executables << '#{Project_details.name.downcase}gem' << '#{Project_details.name.downcase}'
+ s.has_rdoc = false
+end
+ WOK
+ end
+ def self.contents_git(vi)
+ <<-WOK
+Gem::Specification.new do |s|
+ s.name = '#{vi[:project].downcase}'
+ s.version = '#{Version_info.version_number_use(vi)}'
s.date = '#{vi[:date]}'
- s.summary = '#{Project_details.summary} #{Version_info.version_number_info(vi)}'
- s.description = '#{Project_details.description} #{Version_info.version_number_info(vi)} (without external dependencies)'
+ s.summary = '#{Project_details.summary} (linux calls)'
+ s.description = '#{Project_details.description} [#{Version_info.version_number_info(vi)}] (linux calls & without external dependencies)'
s.homepage = '#{Project_details.homepage}'
+ s.authors = ["Ralph Amissah"]
+ s.email = 'ralph.amissah@gmail.com'
s.license = 'GPL3'
- s.files = Dir['lib/#{Project_details.name.downcase}/#{branch}/*.rb'] +
- Dir['data/#{Project_details.name.downcase}/version/#{branch}.yml'] +
+ s.files = `git ls-files -z lib`.split("\x0") +
+ Dir['data/#{Project_details.name.downcase}/version.yml'] +
Dir['data/#{Project_details.name.downcase}/image/*'] +
Dir['bin/#{Project_details.name.downcase}gem'] +
Dir['bin/#{Project_details.name.downcase}']
@@ -592,106 +617,42 @@ end
end
def self.install(fn)
system(%{
- sudo gem install --no-document --verbose #{fn}.gem
+ sudo gem install --local --no-document --verbose #{fn}.gem
})
end
module Current
+ def self.filename
+ Project_details.name.downcase
+ end
def self.filename_stable
Project_details.name.downcase \
+ '-' \
+ Version_info::Current.setting_stable[:version_number]
end
- def self.filename_unstable
- Project_details.name.downcase \
- + '-' \
- + Version_info::Current.setting_unstable[:version_number]
- 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(
- "#{Project_details.name.downcase}-stable",
- current_stable
- )
- end
- def self.create_unstable
- Gemspecs.create(filename_unstable,current_unstable)
- Gemspecs.create(
- "#{Project_details.name.downcase}-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
- module Next
- def self.filename_stable
- Project_details.name.downcase \
- + '-' \
- + Version_info::Next.setting_stable[:version_number]
- end
- def self.filename_unstable
- Project_details.name.downcase \
- + '-' \
- + Version_info::Next.setting_unstable[:version_number]
- 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
+ def self.current_git_version
+ Gemspecs.contents_git(
+ Version_info::Current.setting_stable,
)
end
- def self.create_stable
- Gemspecs.create(filename_stable,setting_stable)
- end
- def self.create_unstable
- Gemspecs.create(filename_unstable,setting_unstable)
+ def self.create_stable(version=:version_standard)
+ (version==:version_git) \
+ ? (Gemspecs.create(filename,current_git_version))
+ : (Gemspecs.create(filename,current_stable))
end
def self.build_stable
- Gemspecs.build(filename_stable)
- end
- def self.build_unstable
- Gemspecs.build(filename_unstable)
+ Gemspecs.build(filename)
end
def self.install_stable
Gemspecs.install(filename_stable)
end
- def self.install_unstable
- Gemspecs.install(filename_unstable)
- end
end
end
module Package
diff --git a/setup/qi_libs_base.rb b/setup/qi_libs_base.rb
index 4126fa3f..63a26548 100644
--- a/setup/qi_libs_base.rb
+++ b/setup/qi_libs_base.rb
@@ -58,7 +58,7 @@ module Project_details
end
def self.version
stamp={}
- v="#{dir.pwd}/conf/sisu/version.yml"
+ v="#{dir.pwd}/data/sisu/version.yml"
if File.exist?(v)
stamp=YAML::load(File::open(v))
stamp[:version]
@@ -142,7 +142,7 @@ module Version_info
end
module Current
def self.yml_file_path(version)
- "data/sisu/version/#{version}.yml"
+ 'data/sisu/version.yml'
end
def self.settings(file)
v="#{Dir.pwd}/#{file}"
@@ -154,21 +154,12 @@ module Version_info
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 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)
@@ -182,15 +173,9 @@ module Version_info
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)
@@ -223,15 +208,6 @@ proceed? }
Version_info::Next.content_stable
)
end
- 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/,'')})
@@ -243,9 +219,6 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_#{vi[:version]}.orig.tar.xz
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
diff --git a/setup/rbuild b/setup/rbuild
index bd34dea2..32017d4f 100644
--- a/setup/rbuild
+++ b/setup/rbuild
@@ -91,22 +91,13 @@ task :gem5cs =>
[:gem_create_spec_stable]
task :gem5createspecs =>
[:gemspecs_stable_create_default_version]
-desc "create sisu v_unstable gemspec"
-task :gem_create_spec_unstable =>
- [:gemspecs_unstable_create_default_version]
-task :gem6cs =>
- [:gem_create_spec_unstable]
-task :gem6createspecs =>
- [:gemspecs_unstable_create_default_version]
desc "create gemspec"
task :gem_create_spec =>
[:gemspecs_create_default_version]
-task :gemcs =>
+task :gem_create =>
[:gemspecs_create_default_version]
task :gemc =>
[:gemspecs_create_default_version]
-task :gemspecscreate =>
- [:gemspecs_create_default_version]
#---
desc "build gem"
task :gem_build =>
@@ -122,25 +113,13 @@ task :gem5b =>
[:gem_build_stable]
task :gem5build =>
[:gem_build_stable]
-desc "build sisu v_unstable gem"
-task :gem_build_unstable =>
- [:gem_unstable_build]
-task :gem6b =>
- [:gem_build_unstable]
-task :gem6build =>
- [:gem_build_unstable]
#---
desc "create, build & install sisu v_stable gem"
task :gem_create_build_install_stable =>
[:gemspecs_stable_create_default_version,:gem_stable_build,:gem_stable_install]
task :gem5cbi =>
[:gem_create_build_install_stable]
-desc "create, build & install sisu v_unstable gem"
-task :gem_create_build_install_unstable =>
- [:gemspecs_unstable_create_default_version,:gem_unstable_build,:gem_unstable_install]
-task :gem6cbi =>
- [:gem_create_build_install_unstable]
-desc "create, build & install sisu v_stable & v_unstable gem"
+desc "create, build & install sisu gem"
task :gem_create_build_install =>
[:gemspecs_create_default_version,:gem_build_,:gem_install_]
task :gemcbi =>
@@ -158,11 +137,6 @@ task :gem_build_install_stable =>
[:gem_stable_build,:gem_install_]
task :gem5bi =>
[:gem_build_install_stable]
-desc "build & install sisu v_unstable gem"
-task :gem_build_install_unstable =>
- [:gem_unstable_build,:gem_install_]
-task :gem6bi =>
- [:gem_build_install_unstable]
desc "build & install gem"
task :gem_build_install =>
[:gem_build,:gem_install_]
@@ -172,9 +146,6 @@ task :gembi =>
#desc "create sisu v_stable gemspec, manually set next version"
task :gem5csn =>
[:gemspecs_stable_create_next_version]
-#desc "create sisu v_unstable gemspec, manually set next version"
-task :gem6csn =>
- [:gemspecs_unstable_create_next_version]
#desc "create gemspec, manually set next version"
task :gemcsn =>
[:gemspecs_create_next_version]
@@ -186,28 +157,19 @@ task :gembn =>
#desc "build sisu v_stable gem, manually set next version"
task :gem5bn =>
[:gem_stable_build_next_version]
-#desc "build sisu v_unstable gem, manually set next version"
-task :gem6bn =>
- [:gem_unstable_build_next_version]
#desc "install gem, manually set next version"
task :gemin =>
[:gem_install_next_version]
#desc "build & install sisu v_stable gem, manually set next version"
task :gem5bin =>
[:gem_stable_build_next_version,:gem_install_next_version]
-#desc "build & install sisu v_unstable gem, manually set next version"
-task :gem6bin =>
- [:gem_unstable_build_next_version,:gem_install_next_version]
#desc "build & install gem, manually set next version"
task :gembin =>
[:gem_build_next_version,:gem_install_next_version]
#desc "create, build & install sisu v_stable gem, manually set next version"
task :gem5cbin =>
[:gemspecs_stable_create_next_version,:gem_stable_build_next_version,:gem_stable_install_next_version]
-#desc "create, build & install sisu v_unstable gem, manually set next version"
-task :gem6cbin =>
- [:gemspecs_unstable_create_next_version,:gem_unstable_build_next_version,:gem_unstable_install_next_version]
-#desc "create, build & install sisu v_stable & v_unstable gem, manually set next version"
+#desc "create, build & install sisu gem, manually set next version"
task :gemcbin =>
[:gemspecs_create_next_version,:gem_build_next_version,:gem_install_next_version]
#---
@@ -458,91 +420,57 @@ task :setup_vim_ do
end
task :gemspec_info do
Gemspecs.info_stable
- Gemspecs.info_unstable
end
task :gemspecs_stable_create_default_version do
Gemspecs::Current.create_stable
end
-task :gemspecs_unstable_create_default_version do
- Gemspecs::Current.create_unstable
-end
task :gemspecs_create_default_version do
Gemspecs::Current.create_stable
- Gemspecs::Current.create_unstable
end
task :gemspecs_stable_create_next_version do
Gemspecs::Next.create_stable
end
-task :gemspecs_unstable_create_next_version do
- Gemspecs::Next.create_unstable
-end
task :gemspecs_create_next_version do
Gemspecs::Next.create_stable
- Gemspecs::Next.create_unstable
end
task :gem_stable_build do
Gemspecs::Current.build_stable
end
-task :gem_unstable_build do
- Gemspecs::Current.build_unstable
-end
task :gem_build_ do
Gemspecs::Current.build_stable
- Gemspecs::Current.build_unstable
end
task :gem_stable_build_next_version do
Gemspecs::Next.build_stable
end
-task :gem_unstable_build_next_version do
- Gemspecs::Next.build_unstable
-end
task :gem_build_next_version do
Gemspecs::Next.build_stable
- Gemspecs::Next.build_unstable
end
task :gem_stable_install do
Gemspecs::Current.install_stable
end
-task :gem_unstable_install do
- Gemspecs::Current.install_unstable
-end
task :gem_install_ do
Gemspecs::Current.install_stable
- Gemspecs::Current.install_unstable
end
task :gem_stable_install_next_version do
Gemspecs::Next.install_stable
end
-task :gem_unstable_install_next_version do
- Gemspecs::Next.install_unstable
-end
task :gem_install_next_version do
Gemspecs::Next.install_stable
- Gemspecs::Next.install_unstable
end
task :changelog_headers do
puts '---'
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 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 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
Version_info::Update.update_stable
- Version_info::Update.update_unstable
end
#%% post install
#%% clobber/remove tasks
@@ -604,11 +532,9 @@ task :note_installation do
rake gem_create_build_install # (to build and install sisu v5 & sisu v6, alias gemcbi)
separate gems are made/installed for sisu v5 & sisu v6 contained in source:
rake gem_create_build_install_stable # (to build and install sisu v5, alias gem5cbi)
- rake gem_create_build_install_unstable # (to build and install sisu v6, alias gem6cbi)
for individual steps (create, build, install) see rake options, rake -T
to specify sisu version for sisu installed via gem
sisu _#{Version_info::Current.setting_stable[:version]}_ --version
- sisu _#{Version_info::Current.setting_unstable[:version]}_ --version
to uninstall sisu installed via gem
sudo gem uninstall --verbose sisu
WOK
diff --git a/setup/rbuild_libs.rb b/setup/rbuild_libs.rb
index 5345631b..f685074e 100644
--- a/setup/rbuild_libs.rb
+++ b/setup/rbuild_libs.rb
@@ -60,7 +60,7 @@ module Project_details
end
def self.version
stamp={}
- v="#{dir.pwd}/conf/sisu/version.yml"
+ v="#{dir.pwd}/data/sisu/version.yml"
if File.exist?(v)
stamp=YAML::load(File::open(v))
stamp[:version]
@@ -190,9 +190,37 @@ module Version_info
:date: "#{vi[:date]}"
WOK
end
+ def self.git_version_extract
+ if FileTest.file?('/usr/bin/git')
+ x=`git describe --long --tags 2>&1`.strip.
+ gsub(/^[a-z_-]*([0-9.]+)/,'\1').
+ gsub(/([^-]*-g)/,'r\1').
+ gsub(/-/,'.')
+ x=(x=~/^[0-9]+\.[0-9]+\.[0-9]+\.r[0-9]+\.g[0-9a-f]{7}/) \
+ ? x
+ : nil
+ else nil
+ end
+ end
+ def self.version_number_use(vi)
+ (git_version_extract.nil?) \
+ ? (vi[:version])
+ : git_version_extract
+ end
+ def self.version_number_info(vi)
+ (Version_info.version_number_use(vi) != vi[:version_number]) \
+ ? (%{#{vi[:version_number]} from git #{Version_info.version_number_use(vi)}})
+ : vi[:version_number]
+ end
+ def self.version_number_info_stable
+ vi=Version_info::Current.setting_stable
+ (Version_info.version_number_use(vi) != vi[:version_number]) \
+ ? (%{#{vi[:version_number]} from git #{Version_info.version_number_use(vi)}})
+ : vi[:version_number]
+ end
module Current
- def self.yml_file_path(version)
- "data/sisu/version/#{version}.yml"
+ def self.yml_file_path
+ 'data/sisu/version.yml'
end
def self.settings(file)
v="#{Dir.pwd}/#{file}"
@@ -202,10 +230,7 @@ module Version_info
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)
+ yml_file_path
end
def self.setting_stable
hsh=settings(file_stable)
@@ -213,18 +238,9 @@ module Version_info
match(hsh[:version])[1]
hsh
end
- def self.setting_unstable
- hsh=settings(file_unstable)
- hsh[:version_number]=/([0-9]+\.[0-9]+\.[0-9]+)/.
- match(hsh[:version])[1]
- hsh
- 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)
@@ -238,15 +254,9 @@ module Version_info
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)
@@ -279,15 +289,6 @@ proceed? }
Version_info::Next.content_stable
)
end
- 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/,'')})
@@ -301,9 +302,6 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_#{vi[:version]}.orig.tar.xz
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
@@ -326,15 +324,7 @@ module GitExtractTaggedVersionBuild
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_#{vb.branch}"
- when /^(?:all)/
- 'gem_create_build'
- else
- 'gem_create_build_stable'
- #'gem_create_build_install_stable'
- end
+ install_branch='gem_create_build_stable'
commands =<<-WOK
git checkout #{ver} &&
rake #{install_branch};
@@ -353,14 +343,7 @@ module GitExtractTaggedVersionBuild
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
+ install_branch='gem_create_build_install_stable'
commands =<<-WOK
git checkout #{ver} &&
rake #{install_branch};
@@ -384,18 +367,19 @@ date: #{vi[:date]}
summary: #{vi[:project]}
WOK
end
- def self.contents(vi,version)
+ def self.contents(vi)
+ #s.summary = '#{vi[:project]}'
<<-WOK
Gem::Specification.new do |s|
s.name = '#{vi[:project].downcase}'
s.version = '#{vi[:version_number]}'
s.date = '#{vi[:date]}'
- s.summary = '#{vi[:project]}'
- s.description = '#{Project_details.name} gem'
+ s.summary = '#{Version_info.version_number_info(vi)}'
+ s.description = 'documents - structuring, publishing in multiple formats and search'
s.authors = ["Ralph Amissah"]
s.email = 'ralph.amissah@gmail.com'
- s.files = Dir['lib/#{Project_details.name.downcase}/#{version}/*.rb'] +
- Dir['data/#{Project_details.name.downcase}/#{version}/version.yml'] +
+ s.files = Dir['lib/#{Project_details.name.downcase}/*.rb'] +
+ Dir['data/#{Project_details.name.downcase}/version.yml'] +
Dir['data/#{Project_details.name.downcase}/image/*'] +
Dir['bin/#{Project_details.name.downcase}gem'] +
Dir['bin/#{Project_details.name.downcase}']
@@ -428,27 +412,12 @@ end
+ '-' \
+ Version_info::Current.setting_stable[:version_number]
end
- def self.filename_unstable
- Project_details.name.downcase \
- + '-' \
- + Version_info::Current.setting_unstable[:version_number]
- 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
@@ -458,25 +427,12 @@ end
current_stable
)
end
- def self.create_unstable
- Gemspecs.create(filename_unstable,current_unstable)
- Gemspecs.create(
- "#{Project_details.name.downcase}-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
module Next
def self.filename_stable
@@ -484,40 +440,19 @@ end
+ '-' \
+ Version_info::Next.setting_stable[:version_number]
end
- def self.filename_unstable
- Project_details.name.downcase \
- + '-' \
- + Version_info::Next.setting_unstable[:version_number]
- 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
end
diff --git a/setup/sisu_version.rb b/setup/sisu_version.rb
index 6361cdc1..07de90cc 100644
--- a/setup/sisu_version.rb
+++ b/setup/sisu_version.rb
@@ -1,10 +1,6 @@
#% constants
module SiSUversion
- SiSU_version_next_stable = '5.9.0' #% set version stable current
- SiSU_version_next_unstable = '6.5.0' #% set version unstable dev
- #% qi quick install file
- SiSU_version_dir_stable = 'current'
- SiSU_version_dir_unstable = 'develop'
+ SiSU_version_next_stable = '7.0.0' #% set version stable current
end
module Dev
GPGpubKey = '1BB4B289'