Skip to content

Commit c9d0bf5

Browse files
committed
fix(apps): avoid symlink that breaks github action cloning
The symlink is invalid when a Github action is cloned because Bazel did not run yet. We should avoid the symlink to keep our actions working: https://github.com/angular/components/runs/6127973017?check_suite_focus=true
1 parent 6354728 commit c9d0bf5

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

apps/BUILD.bazel

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
1+
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "nodejs_binary")
2+
3+
copy_to_bin(
4+
name = "static_runfiles",
5+
srcs = [
6+
"firebase.json",
7+
"firestore.indexes.json",
8+
"firestore.rules",
9+
],
10+
)
211

312
nodejs_binary(
413
name = "serve",
514
chdir = package_name(),
615
data = [
7-
# primary firebase configuration file
8-
"firebase.json",
16+
# top-level static runfiles
17+
":static_runfiles",
918

1019
# Firebase function files
1120
"//apps/functions:functions_compiled",
@@ -17,7 +26,7 @@ nodejs_binary(
1726
"internal-200822",
1827
"--config",
1928
# TODO: Find a way to do this without relying on the copy_to_bin that works cross platform.
20-
"$$(rlocation $(execpath :firebase.json))",
29+
"$$(rlocation dev-infra/apps/firebase.json)",
2130
"emulators:start",
2231
],
2332
)
@@ -26,8 +35,8 @@ nodejs_binary(
2635
name = "deploy",
2736
chdir = package_name(),
2837
data = [
29-
# primary firebase configuration file
30-
"firebase.json",
38+
# top-level static runfiles
39+
":static_runfiles",
3140

3241
# Firebase function files
3342
"//apps/functions:functions_compiled",
@@ -39,7 +48,7 @@ nodejs_binary(
3948
"internal-200822",
4049
"--config",
4150
# TODO: Find a way to do this without relying on the copy_to_bin that works cross platform.
42-
"$$(rlocation $(execpath :firebase.json))",
51+
"$$(rlocation dev-infra/apps/firebase.json)",
4352
"deploy",
4453
"--only",
4554
"functions",

apps/firebase.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"indexes": "firestore.indexes.json"
55
},
66
"functions": {
7-
"predeploy": "bazel build //apps/functions:functions_compiled",
8-
"source": "./functions/dist/functions"
7+
"source": "./functions"
98
},
109
"emulators": {
1110
"functions": {

apps/functions/dist

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)