mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
add interactive confirmation regarding version and build numbers
This commit is contained in:
parent
cf7433655c
commit
5fb02d2eb2
2 changed files with 17 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -x -e
|
set -e
|
||||||
|
|
||||||
source ./env.sh
|
source ./env.sh
|
||||||
|
|
||||||
|
@ -13,6 +13,18 @@ usage() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
confirmDisclaimer() {
|
||||||
|
while true; do
|
||||||
|
# shellcheck disable=SC2162
|
||||||
|
read -p "Please confirm you understand that when using certain values for <version> and <build_number> there is a chance that the resulting app WILL DELETE CRITICAL WALLET DATA. Are you sure you want to continue? (yes/no): " response
|
||||||
|
case $response in
|
||||||
|
[Yy][Ee][Ss] ) echo "Continuing..."; break;;
|
||||||
|
[Nn][Oo] ) exit 0;;
|
||||||
|
* ) echo "Invalid response";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# required args
|
# required args
|
||||||
unset -v APP_VERSION_STRING
|
unset -v APP_VERSION_STRING
|
||||||
unset -v APP_BUILD_NUMBER
|
unset -v APP_BUILD_NUMBER
|
||||||
|
@ -54,6 +66,9 @@ if [ -z "$APP_NAMED_ID" ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
confirmDisclaimer
|
||||||
|
set -x
|
||||||
|
|
||||||
# checks for the correct platform dir and pushes it for later
|
# checks for the correct platform dir and pushes it for later
|
||||||
if printf '%s\0' "${APP_PLATFORMS[@]}" | grep -Fxqz -- "${APP_BUILD_PLATFORM}"; then
|
if printf '%s\0' "${APP_PLATFORMS[@]}" | grep -Fxqz -- "${APP_BUILD_PLATFORM}"; then
|
||||||
pushd "${APP_PROJECT_ROOT_DIR}/scripts/${APP_BUILD_PLATFORM}"
|
pushd "${APP_PROJECT_ROOT_DIR}/scripts/${APP_BUILD_PLATFORM}"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -x -e
|
set -e
|
||||||
|
|
||||||
# set project root
|
# set project root
|
||||||
THIS_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
THIS_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
Loading…
Reference in a new issue