nix: make secretsFile argument optional
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2862f4c772
commit
dbb4b52a70
|
@ -37,14 +37,19 @@ config+="status-im.android.abi-split=\"$(must_get_env ANDROID_ABI_SPLIT)\";"
|
||||||
config+="status-im.android.abi-include=\"$(must_get_env ANDROID_ABI_INCLUDE)\";"
|
config+="status-im.android.abi-include=\"$(must_get_env ANDROID_ABI_INCLUDE)\";"
|
||||||
nixOpts=()
|
nixOpts=()
|
||||||
|
|
||||||
# Secrets like this can't be passed via args or they end up in derivation
|
# If no secrets were passed there's no need to pass the 'secretsFile'
|
||||||
SECRETS_FILE_PATH=$(mktemp)
|
if [[ -n "${KEYSTORE_ALIAS}${KEYSTORE_ALIAS}${KEYSTORE_ALIAS}" ]]; then
|
||||||
chmod 644 ${SECRETS_FILE_PATH}
|
# Secrets like this can't be passed via args or they end up in derivation
|
||||||
trap "rm -f ${SECRETS_FILE_PATH}" EXIT
|
SECRETS_FILE_PATH=$(mktemp)
|
||||||
append_env_export 'KEYSTORE_PASSWORD'
|
trap "rm -f ${SECRETS_FILE_PATH}" EXIT ERR INT QUIT
|
||||||
append_env_export 'KEYSTORE_ALIAS'
|
chmod 644 ${SECRETS_FILE_PATH}
|
||||||
append_env_export 'KEYSTORE_KEY_PASSWORD'
|
append_env_export 'KEYSTORE_PASSWORD'
|
||||||
nixOpts+=("--argstr" "secretsFile" "${SECRETS_FILE_PATH}")
|
append_env_export 'KEYSTORE_ALIAS'
|
||||||
|
append_env_export 'KEYSTORE_KEY_PASSWORD'
|
||||||
|
nixOpts+=("--argstr" "secretsFile" "${SECRETS_FILE_PATH}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Used by Clojure at compile time to include JS modules
|
||||||
nixOpts+=("--argstr" "buildEnv" "$(must_get_env BUILD_ENV)")
|
nixOpts+=("--argstr" "buildEnv" "$(must_get_env BUILD_ENV)")
|
||||||
|
|
||||||
if [[ "$(uname -s)" =~ Darwin ]]; then
|
if [[ "$(uname -s)" =~ Darwin ]]; then
|
||||||
|
|
Loading…
Reference in New Issue