(version, workspace_name, sha_linux, sha_mac)
| 479 | |
| 480 | |
| 481 | def print_firefox(version, workspace_name, sha_linux, sha_mac): |
| 482 | content = "" |
| 483 | |
| 484 | content = ( |
| 485 | content |
| 486 | + f""" http_archive( |
| 487 | name = "linux_{workspace_name}firefox", |
| 488 | url = "{firefox_linux(version)}", |
| 489 | sha256 = "{sha_linux}", |
| 490 | build_file_content = \"\"\" |
| 491 | load("@aspect_rules_js//js:defs.bzl", "js_library") |
| 492 | package(default_visibility = ["//visibility:public"]) |
| 493 | |
| 494 | filegroup( |
| 495 | name = "files", |
| 496 | srcs = glob(["**/*"]), |
| 497 | ) |
| 498 | |
| 499 | exports_files(["firefox/firefox"]) |
| 500 | |
| 501 | js_library( |
| 502 | name = "firefox-js", |
| 503 | data = [":files"], |
| 504 | ) |
| 505 | \"\"\", |
| 506 | ) |
| 507 | |
| 508 | """ |
| 509 | ) |
| 510 | |
| 511 | content = ( |
| 512 | content |
| 513 | + f""" dmg_archive( |
| 514 | name = "mac_{workspace_name}firefox", |
| 515 | url = "{firefox_mac(version)}", |
| 516 | sha256 = "{sha_mac}", |
| 517 | build_file_content = \"\"\" |
| 518 | load("@aspect_rules_js//js:defs.bzl", "js_library") |
| 519 | package(default_visibility = ["//visibility:public"]) |
| 520 | |
| 521 | exports_files(["Firefox.app"]) |
| 522 | |
| 523 | js_library( |
| 524 | name = "firefox-js", |
| 525 | data = glob(["Firefox.app/**/*"], allow_empty = True), |
| 526 | ) |
| 527 | \"\"\", |
| 528 | ) |
| 529 | |
| 530 | """ |
| 531 | ) |
| 532 | |
| 533 | return content |
| 534 | |
| 535 | |
| 536 | if __name__ == "__main__": |
no test coverage detected