|
1 | | -load("@bazel_skylib//rules:diff_test.bzl", "diff_test") |
2 | | -load("@bazel_skylib//rules:write_file.bzl", "write_file") |
| 1 | +load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file") |
3 | 2 | load("//tools:defaults.bzl", "jasmine_test", "ts_project") |
4 | 3 |
|
5 | 4 | ts_project( |
@@ -32,26 +31,8 @@ genrule( |
32 | 31 | """, |
33 | 32 | ) |
34 | 33 |
|
35 | | -diff_test( |
36 | | - name = "beasties_license_test", |
37 | | - failure_message = """ |
38 | | -
|
39 | | - To accept the new golden file, execute: |
40 | | - pnpm bazel run //packages/angular/ssr/test/npm_package:beasties_license_test.accept |
41 | | - """, |
42 | | - file1 = ":THIRD_PARTY_LICENSES.txt.golden", |
43 | | - file2 = ":beasties_license_file", |
44 | | -) |
45 | | - |
46 | | -write_file( |
47 | | - name = "beasties_license_test.accept", |
48 | | - out = "beasties_license_file_accept.sh", |
49 | | - content = |
50 | | - [ |
51 | | - "#!/usr/bin/env bash", |
52 | | - "cd ${BUILD_WORKSPACE_DIRECTORY}", |
53 | | - "pnpm bazel build //packages/angular/ssr:npm_package", |
54 | | - "cp -fv dist/bin/packages/angular/ssr/npm_package/third_party/beasties/THIRD_PARTY_LICENSES.txt packages/angular/ssr/test/npm_package/THIRD_PARTY_LICENSES.txt.golden", |
55 | | - ], |
56 | | - is_executable = True, |
| 34 | +write_source_file( |
| 35 | + name = "beasties_license", |
| 36 | + in_file = ":beasties_license_file", |
| 37 | + out_file = ":THIRD_PARTY_LICENSES.txt.golden", |
57 | 38 | ) |
0 commit comments