Drop comment and add lines
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d0f1892038
commit
cc91a15379
|
@ -3,8 +3,6 @@
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
file_env() {
|
file_env() {
|
||||||
# https://medium.com/@adrian.gheorghe.dev/using-docker-secrets-in-your-environment-variables-7a0609659aab
|
|
||||||
|
|
||||||
local var="$1"
|
local var="$1"
|
||||||
local fileVar="${var}_FILE"
|
local fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
local def="${2:-}"
|
||||||
|
@ -15,6 +13,7 @@ file_env() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local val="$def"
|
local val="$def"
|
||||||
|
|
||||||
if [ "${!var:-}" ]; then
|
if [ "${!var:-}" ]; then
|
||||||
val="${!var}"
|
val="${!var}"
|
||||||
elif [ "${!fileVar:-}" ]; then
|
elif [ "${!fileVar:-}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue