lib/rake/funnel/support/version_info.rb in rake-funnel-0.22.2 vs lib/rake/funnel/support/version_info.rb in rake-funnel-0.22.3
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'ostruct'
module Rake
module Funnel
module Support
@@ -47,15 +49,17 @@
def assembly_file_version(context)
version = assembly_version(context)
build_number = numeric(context.fetch(:metadata, {})[:build])
return version.sub(/\.0$/, ".#{build_number}") if build_number
+
version
end
def numeric(str)
return str if str.to_s =~ /^\d+$/
+
nil
end
def assembly_informational_version(context) # rubocop:disable Metrics/MethodLength
version = default_version(context)
@@ -87,9 +91,10 @@
metadata = metadata.map do |key, value|
[key.to_s, value.to_s] if value
end.compact
return nil if metadata.empty?
+
metadata.join('.')
end
end
end
end