Skip to content

Commit

Permalink
fix(apps): avoid symlink that breaks github action cloning
Browse files Browse the repository at this point in the history
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
  • Loading branch information
devversion committed Apr 22, 2022
1 parent 6354728 commit c9d0bf5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
23 changes: 16 additions & 7 deletions apps/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "nodejs_binary")

copy_to_bin(
name = "static_runfiles",
srcs = [
"firebase.json",
"firestore.indexes.json",
"firestore.rules",
],
)

nodejs_binary(
name = "serve",
chdir = package_name(),
data = [
# primary firebase configuration file
"firebase.json",
# top-level static runfiles
":static_runfiles",

# Firebase function files
"//apps/functions:functions_compiled",
Expand All @@ -17,7 +26,7 @@ nodejs_binary(
"internal-200822",
"--config",
# TODO: Find a way to do this without relying on the copy_to_bin that works cross platform.
"$$(rlocation $(execpath :firebase.json))",
"$$(rlocation dev-infra/apps/firebase.json)",
"emulators:start",
],
)
Expand All @@ -26,8 +35,8 @@ nodejs_binary(
name = "deploy",
chdir = package_name(),
data = [
# primary firebase configuration file
"firebase.json",
# top-level static runfiles
":static_runfiles",

# Firebase function files
"//apps/functions:functions_compiled",
Expand All @@ -39,7 +48,7 @@ nodejs_binary(
"internal-200822",
"--config",
# TODO: Find a way to do this without relying on the copy_to_bin that works cross platform.
"$$(rlocation $(execpath :firebase.json))",
"$$(rlocation dev-infra/apps/firebase.json)",
"deploy",
"--only",
"functions",
Expand Down
3 changes: 1 addition & 2 deletions apps/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": "bazel build //apps/functions:functions_compiled",
"source": "./functions/dist/functions"
"source": "./functions"
},
"emulators": {
"functions": {
Expand Down
1 change: 0 additions & 1 deletion apps/functions/dist

This file was deleted.

0 comments on commit c9d0bf5

Please sign in to comment.