Skip to content

Commit

Permalink
allow non-standard version scheme
Browse files Browse the repository at this point in the history
this will allow a space in the version definition (e.g. "11.2 Beta" becomes "11.2-beta" and is parsed as "11.2.pre.beta" in Gem convention)
  • Loading branch information
jtroe committed Sep 28, 2023
1 parent b6eba15 commit bfed2ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cookbooks/arcgis-enterprise/libraries/datastore_tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def configure_datastore(stores, server_url, username, password, data_dir, mode =
# Only add --mode parameter for post 10.8.1 tilecache data stores
# if the last known status is not 'Upgrading'.
if !mode.nil? && !mode.empty? &&
Gem::Version.new(@version) >= Gem::Version.new('10.8.1') &&
Gem::Version.new(@version.gsub(/\s+/, '-')) >= Gem::Version.new('10.8.1') &&
stores.downcase.include?('tilecache') &&
last_known_status(data_dir) != 'Upgrading'
args += " --mode #{mode}"
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/arcgis-enterprise/providers/datastore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@

# At 10.8 tilecache backup location is no longer registered by default
# therefore --operation register needs to be used.
if %w[tilecache spatiotemporal graph].include?(@new_resource.store) && Gem::Version.new(node['arcgis']['version']) >= Gem::Version.new('10.8')
if %w[tilecache spatiotemporal graph].include?(@new_resource.store) && Gem::Version.new(node['arcgis']['version'].gsub(/\s+/, '-')) >= Gem::Version.new('10.8')
operation = 'register'
end

Expand Down

0 comments on commit bfed2ac

Please sign in to comment.