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