Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment brix11 version and simplified the usage #157

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading