DEV: Fix Ember version lookup (#18136)
The source-of-truth for our ember version is now the installed node_module. The `ember_source` gem carries an old version of Ember and so the constant is no longer useful. We'll be dropping the gem soon.
This commit is contained in:
parent
e33d694361
commit
6570fed175
|
@ -157,7 +157,7 @@ class Theme < ActiveRecord::Base
|
|||
get_set_cache "compiler_version" do
|
||||
dependencies = [
|
||||
BASE_COMPILER_VERSION,
|
||||
Ember::VERSION,
|
||||
EmberCli.ember_version,
|
||||
GlobalSetting.cdn_url,
|
||||
GlobalSetting.s3_cdn_url,
|
||||
GlobalSetting.s3_endpoint,
|
||||
|
|
|
@ -49,4 +49,11 @@ module EmberCli
|
|||
def self.is_ember_cli_asset?(name)
|
||||
assets.include?(name) || name.start_with?("chunk.")
|
||||
end
|
||||
|
||||
def self.ember_version
|
||||
@version ||= begin
|
||||
ember_source_package_raw = File.read("#{Rails.root}/app/assets/javascripts/node_modules/ember-source/package.json")
|
||||
JSON.parse(ember_source_package_raw)["version"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue