Compare commits
2 Commits
6e094dce97
...
ae75767b1c
| Author | SHA1 | Date | |
|---|---|---|---|
| ae75767b1c | |||
| c17a13039d |
@@ -17,7 +17,7 @@ uses_functions:
|
||||
uses_types: []
|
||||
framework: ""
|
||||
entry_point: "web_proxy"
|
||||
dir_path: "apps/web_proxy"
|
||||
dir_path: "projects/web_scraping/apps/web_proxy"
|
||||
repo_url: ""
|
||||
service:
|
||||
port: 8080
|
||||
@@ -28,7 +28,7 @@ service:
|
||||
restart_policy: always
|
||||
runtime: systemd-user
|
||||
pc_targets:
|
||||
- home-wsl
|
||||
- lucas-linux
|
||||
is_local_only: true
|
||||
e2e_checks:
|
||||
- id: syntax
|
||||
|
||||
@@ -23,8 +23,21 @@ set -uo pipefail
|
||||
# --- Resolucion de rutas -----------------------------------------------------
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
# apps/web_proxy/ -> raiz del registry son dos niveles arriba.
|
||||
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../.." && pwd)}"
|
||||
# La raiz del registry es el directorio que contiene registry.db (db_locations.md:
|
||||
# registry.db SOLO existe en la raiz). Se busca hacia arriba desde la ubicacion del
|
||||
# script, de modo que funcione esté la app en apps/ o en projects/<p>/apps/.
|
||||
_find_registry_root() {
|
||||
local d="$SCRIPT_DIR"
|
||||
while [ "$d" != "/" ]; do
|
||||
if [ -f "$d/registry.db" ]; then
|
||||
echo "$d"
|
||||
return 0
|
||||
fi
|
||||
d="$(dirname "$d")"
|
||||
done
|
||||
return 1
|
||||
}
|
||||
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-$(_find_registry_root)}"
|
||||
export FN_REGISTRY_ROOT="$REGISTRY_ROOT"
|
||||
|
||||
FN_BIN="$REGISTRY_ROOT/fn"
|
||||
|
||||
Reference in New Issue
Block a user