fx build fix
This commit is contained in:
@@ -6,10 +6,14 @@ if ! set -o pipefail 2>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
sh ci/pipelines/fx/ensure_env_version.sh
|
sh ci/pipelines/fx/ensure_env_version.sh
|
||||||
sed -i 's/\r$//' ./ci/prod/.env.runtime
|
normalize_env_file() {
|
||||||
sed -i 's/\r$//' ./.env.version
|
file="$1"
|
||||||
|
tmp="${file}.tmp.$$"
|
||||||
|
tr -d '\r' <"$file" >"$tmp"
|
||||||
|
mv "$tmp" "$file"
|
||||||
|
}
|
||||||
|
|
||||||
lc_load_env_file() {
|
load_env_file() {
|
||||||
file="$1"
|
file="$1"
|
||||||
while IFS= read -r line || [ -n "$line" ]; do
|
while IFS= read -r line || [ -n "$line" ]; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
@@ -20,13 +24,15 @@ lc_load_env_file() {
|
|||||||
key="$(printf '%s' "$key" | tr -d '[:space:]')"
|
key="$(printf '%s' "$key" | tr -d '[:space:]')"
|
||||||
value="${value#"${value%%[![:space:]]*}"}"
|
value="${value#"${value%%[![:space:]]*}"}"
|
||||||
value="${value%"${value##*[![:space:]]}"}"
|
value="${value%"${value##*[![:space:]]}"}"
|
||||||
value="${value%$'\r'}"
|
|
||||||
export "$key=$value"
|
export "$key=$value"
|
||||||
done <"$file"
|
done <"$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
lc_load_env_file ./ci/prod/.env.runtime
|
normalize_env_file ./ci/prod/.env.runtime
|
||||||
lc_load_env_file ./.env.version
|
normalize_env_file ./.env.version
|
||||||
|
|
||||||
|
load_env_file ./ci/prod/.env.runtime
|
||||||
|
load_env_file ./.env.version
|
||||||
|
|
||||||
REGISTRY_URL="${REGISTRY_URL:?missing REGISTRY_URL}"
|
REGISTRY_URL="${REGISTRY_URL:?missing REGISTRY_URL}"
|
||||||
APP_V="${APP_V:?missing APP_V}"
|
APP_V="${APP_V:?missing APP_V}"
|
||||||
|
|||||||
@@ -6,10 +6,14 @@ if ! set -o pipefail 2>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
sh ci/pipelines/fx/ensure_env_version.sh
|
sh ci/pipelines/fx/ensure_env_version.sh
|
||||||
sed -i 's/\r$//' ./ci/prod/.env.runtime
|
normalize_env_file() {
|
||||||
sed -i 's/\r$//' ./.env.version
|
file="$1"
|
||||||
|
tmp="${file}.tmp.$$"
|
||||||
|
tr -d '\r' <"$file" >"$tmp"
|
||||||
|
mv "$tmp" "$file"
|
||||||
|
}
|
||||||
|
|
||||||
lc_load_env_file() {
|
load_env_file() {
|
||||||
file="$1"
|
file="$1"
|
||||||
while IFS= read -r line || [ -n "$line" ]; do
|
while IFS= read -r line || [ -n "$line" ]; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
@@ -20,13 +24,15 @@ lc_load_env_file() {
|
|||||||
key="$(printf '%s' "$key" | tr -d '[:space:]')"
|
key="$(printf '%s' "$key" | tr -d '[:space:]')"
|
||||||
value="${value#"${value%%[![:space:]]*}"}"
|
value="${value#"${value%%[![:space:]]*}"}"
|
||||||
value="${value%"${value##*[![:space:]]}"}"
|
value="${value%"${value##*[![:space:]]}"}"
|
||||||
value="${value%$'\r'}"
|
|
||||||
export "$key=$value"
|
export "$key=$value"
|
||||||
done <"$file"
|
done <"$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
lc_load_env_file ./ci/prod/.env.runtime
|
normalize_env_file ./ci/prod/.env.runtime
|
||||||
lc_load_env_file ./.env.version
|
normalize_env_file ./.env.version
|
||||||
|
|
||||||
|
load_env_file ./ci/prod/.env.runtime
|
||||||
|
load_env_file ./.env.version
|
||||||
|
|
||||||
FX_MONGO_SECRET_PATH="${FX_MONGO_SECRET_PATH:?missing FX_MONGO_SECRET_PATH}"
|
FX_MONGO_SECRET_PATH="${FX_MONGO_SECRET_PATH:?missing FX_MONGO_SECRET_PATH}"
|
||||||
FX_DEPLOY_TARGET="${FX_DEPLOY_TARGET:?missing FX_DEPLOY_TARGET}"
|
FX_DEPLOY_TARGET="${FX_DEPLOY_TARGET:?missing FX_DEPLOY_TARGET}"
|
||||||
|
|||||||
Reference in New Issue
Block a user