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