discourse/script/run-licensee
David Taylor 8fce1ad068
DEV: Update licensee config & execution (#40454)
- Create a script which runs licensee for all workspaces
- Remove redundant licenses (CC0-1.0 and ISC) are in the blueOak list
already
- Remove redundant package exceptions. These have either fixed their
license metadata, or are no longer dependencies of Discourse
- Bump version on jspreadsheet-ce exception
2026-06-03 15:48:08 +01:00

36 lines
650 B
Ruby
Executable file
Vendored

#!/usr/bin/env ruby
# frozen_string_literal: true
root = File.expand_path("..", __dir__)
config = File.join(root, ".licensee.json")
recursive_opts = %w[-r --parallel --filter=!./plugins/*]
begin
system(
"pnpm",
*recursive_opts,
"exec",
"ln",
"-sf",
config,
".licensee.json",
chdir: root,
exception: true,
)
ok =
system(
"pnpm",
*recursive_opts,
"--include-workspace-root",
"exec",
"licensee",
"--errors-only",
chdir: root,
)
exit(ok ? 0 : 1)
ensure
system("pnpm", *recursive_opts, "--no-bail", "exec", "rm", "-f", ".licensee.json", chdir: root)
end