updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
@ -2,11 +2,9 @@
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
|
||||
DEST_DIR=$1
|
||||
|
||||
PROJECT_SCRIPTS_DIR=$(realpath "$0")
|
||||
PROJECT_SCRIPTS_DIR=$(dirname "${PROJECT_SCRIPTS_DIR}")
|
||||
. "${PROJECT_SCRIPTS_DIR}/env.sh" "$2" "$3" "$4" "$5" "$6"
|
||||
. "${PROJECT_SCRIPTS_DIR}/env.sh" "$1" "$2" "$3" "$4" "$5"
|
||||
|
||||
function error_exit() {
|
||||
echo $1
|
||||
@ -27,16 +25,7 @@ if [ ! -d "${PROJECT_DIST_DIR}" ]; then
|
||||
error_exit "dist directory not found: ${PROJECT_DIST_DIR}" 2
|
||||
fi
|
||||
|
||||
if [ "${DEST_DIR}" == "" ]; then
|
||||
DEST_DIR="${PROJECT_DIST_DIR}"
|
||||
fi
|
||||
DEST_DIR=$(realpath "${DEST_DIR}")
|
||||
|
||||
if [ ! -d "${DEST_DIR}" ]; then
|
||||
error_exit "dest directory not found: ${DEST_DIR}" 1
|
||||
fi
|
||||
|
||||
pushd "${DEST_DIR}"
|
||||
pushd "${PROJECT_DIST_DIR}"
|
||||
if [ -f "${PROJECT_OUT_FILE}" ]; then
|
||||
rm -f "${PROJECT_OUT_FILE}" || error_exit "failed to delete file: ${PROJECT_OUT_FILE}" 1
|
||||
fi
|
||||
@ -69,7 +58,7 @@ unset IFS
|
||||
set +f
|
||||
popd
|
||||
|
||||
pushd "${DEST_DIR}"
|
||||
pushd "${PROJECT_DIST_DIR}"
|
||||
tar cvzf "${PROJECT_OUT_FILE}" -C ${TEMP_DIR} . || error_exit "failed to create archive: ${PROJECT_OUT_FILE}" 1
|
||||
create_file_validations "${PROJECT_OUT_FILE}"
|
||||
popd
|
||||
|
Reference in New Issue
Block a user