From cfff225ad683b73e361fd6c0a03b5ba962f0fe80 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 15 Sep 2021 15:49:17 +0300 Subject: [PATCH] Change the docker and appImage deployment scripts to not alter the deployment string if no deployment argument is passed --- build_scripts/build_package.sh | 2 +- build_scripts/common.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build_scripts/build_package.sh b/build_scripts/build_package.sh index 4cbe30b1a..eebae5d89 100755 --- a/build_scripts/build_package.sh +++ b/build_scripts/build_package.sh @@ -112,7 +112,7 @@ branch="develop" monkey_repo="$DEFAULT_REPO_MONKEY_HOME" monkey_version="dev" package="" -deployment_type="develop" +deployment_type="" while (( "$#" )); do case "$1" in diff --git a/build_scripts/common.sh b/build_scripts/common.sh index 5e029433e..a8e7c190a 100644 --- a/build_scripts/common.sh +++ b/build_scripts/common.sh @@ -16,8 +16,10 @@ copy_monkey_island_to_build_dir() { } modify_deployment() { - local deployment_file_path="$2/monkey_island/cc/deployment.json" - echo -e "{\n \"deployment\": \"$1\"\n}" > $deployment_file_path + if [ -n "$1" ]; then + local deployment_file_path="$2/monkey_island/cc/deployment.json" + echo -e "{\n \"deployment\": \"$1\"\n}" > $deployment_file_path + fi } add_agent_binaries_to_build_dir() {