diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bd1aedac0..6ced5c9ed 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,7 +18,7 @@ jobs: - name: Configure app run: | cd scripts - echo "yes" | ./build_app.sh -v "0.0.1" -b "1" -p "linux" -a "stack_wallet" + echo "yes" | ./build_app.sh -v "0.0.1" -b "1" -p "linux" -a "stack_wallet" -s - name: Get dependencies run: flutter pub get diff --git a/scripts/build_app.sh b/scripts/build_app.sh index 30bbc8215..36721003c 100755 --- a/scripts/build_app.sh +++ b/scripts/build_app.sh @@ -9,7 +9,7 @@ APP_NAMED_IDS=("stack_wallet" "stack_duo" "campfire") # Function to display usage. usage() { - echo "Usage: $0 -v -b -p -a [-i] [-f]" + echo "Usage: $0 -v -b -p -a [-i] [-f] [-s]" exit 1 } @@ -34,9 +34,10 @@ unset -v APP_NAMED_ID # optional args (with defaults) BUILD_CRYPTO_PLUGINS=0 BUILD_ISAR_FROM_SOURCE=0 +USE_SYSTEM_SECURE_STORAGE_DEPS=0 # Parse command-line arguments. -while getopts "v:b:p:a:i:f" opt; do +while getopts "v:b:p:a:i:fs" opt; do case "${opt}" in v) APP_VERSION_STRING="$OPTARG" ;; b) APP_BUILD_NUMBER="$OPTARG" ;; @@ -44,6 +45,7 @@ while getopts "v:b:p:a:i:f" opt; do a) APP_NAMED_ID="$OPTARG" ;; i) BUILD_CRYPTO_PLUGINS=1 ;; f) BUILD_ISAR_FROM_SOURCE=1 ;; + s) USE_SYSTEM_SECURE_STORAGE_DEPS=1 ;; *) usage ;; esac done @@ -74,6 +76,7 @@ set -x source "${APP_PROJECT_ROOT_DIR}/scripts/app_config/templates/configure_template_files.sh" export BUILD_ISAR_FROM_SOURCE +export USE_SYSTEM_SECURE_STORAGE_DEPS # checks for the correct platform dir and pushes it for later if printf '%s\0' "${APP_PLATFORMS[@]}" | grep -Fxqz -- "${APP_BUILD_PLATFORM}"; then diff --git a/scripts/linux/build_secure_storage_deps.sh b/scripts/linux/build_secure_storage_deps.sh index 737508ab0..e84572bca 100755 --- a/scripts/linux/build_secure_storage_deps.sh +++ b/scripts/linux/build_secure_storage_deps.sh @@ -1,4 +1,10 @@ #!/bin/bash + +if [ "${USE_SYSTEM_SECURE_STORAGE_DEPS:-0}" = "1" ]; then + echo "USE_SYSTEM_SECURE_STORAGE_DEPS is set; skipping build of jsoncpp and libsecret (using system packages)" + exit 0 +fi + LINUX_DIRECTORY=$(pwd) JSONCPP_TAG=1.7.4 LIBSECRET_TAG=0.21.4