discourse/script/regen_ember_5_lockfile
David Taylor 2f40d9b07b
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.
2023-12-20 11:45:01 +00:00

17 lines
431 B
Ruby
Executable File

#!/usr/bin/env ruby
# frozen_string_literal: true
require "fileutils"
# rubocop:disable Discourse/NoChdir
Dir.chdir("#{__dir__}/../app/assets/javascripts") do
FileUtils.rm("yarn-ember5.lock")
FileUtils.cp("yarn-ember3.lock", "yarn-ember5.lock")
system("#{__dir__}/switch_ember_version", "5", exception: true)
system "yarn install", exception: true
system("#{__dir__}/switch_ember_version", "3", exception: true)
end