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:
David Taylor
2023-12-20 11:45:01 +00:00
committed by GitHub
parent f5ca96528d
commit 2f40d9b07b
3 changed files with 282 additions and 51 deletions

View File

@ -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