diff --git a/scripts/travis.sh b/scripts/travis.sh index 5960447d..14780ea7 100644 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -1,6 +1,7 @@ #!/bin/bash LOG_FILE="auto-build/logs/build.log" +PACKAGES_DIRECTORY="auto-build/packages/" build_verbose=1 build_release=1 build_debug=0 @@ -173,8 +174,8 @@ function move_target_file() { handle_failure -1 "Failed to find target file" fi - mkdir -p packages || { echo "failed to create target path"; exit 1; } - target_file="../packages/$file_name" + mkdir -p "${PACKAGES_DIRECTORY}" || { echo "failed to create target path"; exit 1; } + target_file="${PACKAGES_DIRECTORY}/$file_name" if [[ -f "$target_file" ]]; then echo "Removing old packed file located at $target_file" rm "${target_file}" && handle_failure -1 "Failed to remove target file" diff --git a/scripts/travis_deploy.sh b/scripts/travis_deploy.sh index b35f0483..4258f5d5 100644 --- a/scripts/travis_deploy.sh +++ b/scripts/travis_deploy.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +PACKAGES_DIRECTORY="auto-build/packages/" +LOG_FILE="auto-build/logs/build.log" + if [[ -z "${GIT_AUTHTOKEN}" ]]; then echo "Missing environment variable GIT_AUTHTOKEN. Please set it before usign this script!" exit 1 @@ -40,6 +43,7 @@ if [[ ! -x ${GIT_RELEASE_EXECUTABLE} ]]; then fi fi +cd "$(dirname "$0")/.." || { echo "Failed to enter base dir"; exit 1; } echo "Generating release" ${GIT_RELEASE_EXECUTABLE} release \ --repo "TeaWeb" \ @@ -54,7 +58,7 @@ ${GIT_RELEASE_EXECUTABLE} release \ } echo "Uploading release files" -folders=("/tmp/build/logs/" "/tmp/build/packages/") +folders=("${LOG_FILE}" "${PACKAGES_DIRECTORY}") uploaded_files=() failed_files=()