mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:51:07 +08:00
DEV: Correct ember-5 lockfile generation (#24983)
The regen_ember_5_lockfile script was actually just duplicating the ember3 lockfile without changes 🤦♂️. This commit fixes that, and updates the ember-version-enforcement workflow to detect lockfile issues in future.
This commit is contained in:
@ -5,17 +5,12 @@ require "fileutils"
|
||||
|
||||
# rubocop:disable Discourse/NoChdir
|
||||
Dir.chdir("#{__dir__}/../app/assets/javascripts") do
|
||||
FileUtils.mv("yarn.lock", "yarn.lock-tmp")
|
||||
FileUtils.mv("package.json", "package.json-tmp")
|
||||
|
||||
File.symlink("package-ember5.json", "package.json")
|
||||
File.symlink("yarn-ember5.lock", "yarn.lock")
|
||||
|
||||
system "yarn install", exception: true
|
||||
|
||||
FileUtils.rm("yarn-ember5.lock")
|
||||
FileUtils.cp("yarn-ember3.lock", "yarn-ember5.lock")
|
||||
|
||||
FileUtils.mv("yarn.lock-tmp", "yarn.lock")
|
||||
FileUtils.mv("package.json-tmp", "package.json")
|
||||
system("#{__dir__}/switch_ember_version", "5", exception: true)
|
||||
|
||||
system "yarn install", exception: true
|
||||
|
||||
system("#{__dir__}/switch_ember_version", "3", exception: true)
|
||||
end
|
||||
|
Reference in New Issue
Block a user