Skip to content

Commit

Permalink
Merge pull request #157 from jwillemsen/jwi-brix11version
Browse files Browse the repository at this point in the history
Increment brix11 version and simplified the usage
  • Loading branch information
jwillemsen authored Nov 6, 2023
2 parents 8079a79 + 75e815c commit 9bf279d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 1 addition & 4 deletions brix11/lib/brix11.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
#--------------------------------------------------------------------

module BRIX11
VERSION = '1.1.0'
VERSION_MAJOR,
VERSION_MINOR,
VERSION_RELEASE, = VERSION.split('.').collect { |e| e.to_i }
VERSION = { major: 2, minor: 6, release: 0 }
COPYRIGHT = "Copyright (c) 2014-#{Time.now.year} Remedy IT Expertise BV, The Netherlands".freeze

def self.root_path
Expand Down
14 changes: 9 additions & 5 deletions brix11/lib/brix11/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def set_reporter(rep)
@reporter = rep
end

def version
"#{VERSION[:major]}.#{VERSION[:minor]}.#{VERSION[:release]}"
end

private
#
# Configuration handling
Expand Down Expand Up @@ -121,7 +125,7 @@ def self.init_optparser
'List available project types (with compiler options) and active default') {
options.load_config
load_brix
puts "BRIX11 pluggable scaffolding tool #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_RELEASE}"
puts "BRIX11 pluggable scaffolding tool #{version}"
puts COPYRIGHT
puts
puts ' %-45s | %-35s' % ['Project type [compilers]', 'Description']
Expand Down Expand Up @@ -181,7 +185,7 @@ def self.init_optparser
'Print specified or active config and exit.',
"Default: active configuration") { |v|
options.load_config unless String === v
puts "BRIX11 pluggable scaffolding tool #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_RELEASE}"
puts "BRIX11 pluggable scaffolding tool #{version}"
puts COPYRIGHT
puts
puts options.print_config(String === v ? v : nil)
Expand All @@ -193,7 +197,7 @@ def self.init_optparser
'List available brix collections and exit.') {
options.load_config
load_brix
puts "BRIX11 pluggable scaffolding tool #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_RELEASE}"
puts "BRIX11 pluggable scaffolding tool #{version}"
puts COPYRIGHT
puts
print ' '
Expand All @@ -207,7 +211,7 @@ def self.init_optparser
BRIX11.log_fatal("Invalid switch -L#{v}") unless v == true || v == 'all'
options.load_config
load_brix
puts "BRIX11 pluggable scaffolding tool #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_RELEASE}"
puts "BRIX11 pluggable scaffolding tool #{version}"
puts COPYRIGHT
puts
print ' '
Expand All @@ -230,7 +234,7 @@ def self.init_optparser
'Show version information and exit.') {
options.load_config
load_brix
puts "BRIX11 pluggable scaffolding tool #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_RELEASE}"
puts "BRIX11 pluggable scaffolding tool #{version}"
puts COPYRIGHT
puts
puts '--- [Brix collections] ---'
Expand Down
2 changes: 1 addition & 1 deletion brix11/lib/brix11/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _defaults
help_proc: lambda {
options.load_config
load_brix
puts "BRIX11 pluggable scaffolding tool #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_RELEASE}"
puts "BRIX11 pluggable scaffolding tool #{version}"
puts COPYRIGHT
puts
puts BRIX11.options.optparser
Expand Down

0 comments on commit 9bf279d

Please sign in to comment.