Compare commits
2 Commits
6e094dce97
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ae75767b1c | |||
| c17a13039d |
@@ -17,7 +17,7 @@ uses_functions:
|
|||||||
uses_types: []
|
uses_types: []
|
||||||
framework: ""
|
framework: ""
|
||||||
entry_point: "web_proxy"
|
entry_point: "web_proxy"
|
||||||
dir_path: "apps/web_proxy"
|
dir_path: "projects/web_scraping/apps/web_proxy"
|
||||||
repo_url: ""
|
repo_url: ""
|
||||||
service:
|
service:
|
||||||
port: 8080
|
port: 8080
|
||||||
@@ -28,7 +28,7 @@ service:
|
|||||||
restart_policy: always
|
restart_policy: always
|
||||||
runtime: systemd-user
|
runtime: systemd-user
|
||||||
pc_targets:
|
pc_targets:
|
||||||
- home-wsl
|
- lucas-linux
|
||||||
is_local_only: true
|
is_local_only: true
|
||||||
e2e_checks:
|
e2e_checks:
|
||||||
- id: syntax
|
- id: syntax
|
||||||
|
|||||||
@@ -23,8 +23,21 @@ set -uo pipefail
|
|||||||
# --- Resolucion de rutas -----------------------------------------------------
|
# --- Resolucion de rutas -----------------------------------------------------
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
# apps/web_proxy/ -> raiz del registry son dos niveles arriba.
|
# La raiz del registry es el directorio que contiene registry.db (db_locations.md:
|
||||||
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../.." && pwd)}"
|
# 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"
|
export FN_REGISTRY_ROOT="$REGISTRY_ROOT"
|
||||||
|
|
||||||
FN_BIN="$REGISTRY_ROOT/fn"
|
FN_BIN="$REGISTRY_ROOT/fn"
|
||||||
|
|||||||
Reference in New Issue
Block a user