Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
## v2.0.2-rc ### BREAKING CHANGES * Refactored `config.json` - will need to verify configuration settings prior to mounting ### Issues * \#12 \[Unit Test\] Complete all providers unit tests * \#14 \[Unit Test\] SQLite mini-ORM unit tests and cleanup * \#16 Add support for bucket name in Sia provider * \#17 Update to common c++ build system * A single 64-bit Linux Jenkins server is used to build all Linux and Windows versions * All dependency sources are now included * MSVC is no longer supported * MSYS2 is required for building Windows binaries on Windows * OS X support is temporarily disabled * \#19 \[bug\] Rename file is broken for files that are existing * \#23 \[bug\] Incorrect file size displayed while upload is pending * \#24 RocksDB implementations should be transactional * \#25 Writes should block when maximum cache size is reached * \#26 Complete ring buffer and direct download support ### Changes from v2.0.1-rc * Ability to choose between RocksDB and SQLite databases * Added direct reads and implemented download fallback * Corrected file times on S3 and Sia providers * Corrected handling of `chown()` and `chmod()` * Fixed erroneous download of chunks after resize Reviewed-on: #27
70 lines
1.9 KiB
Bash
Executable File
70 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
DEST_DIR=$1
|
|
DIST_DIR=$2
|
|
|
|
PROJECT_SCRIPTS_DIR=$(realpath "$0")
|
|
PROJECT_SCRIPTS_DIR=$(dirname "${PROJECT_SCRIPTS_DIR}")
|
|
. "${PROJECT_SCRIPTS_DIR}/env.sh" "$3" "$4" "$5" "$6" "$7"
|
|
|
|
function error_exit() {
|
|
echo $1
|
|
exit $2
|
|
}
|
|
|
|
if [ ! -d "${PROJECT_DIST_DIR}" ]; then
|
|
error_exit "dist directory not found: ${PROJECT_DIST_DIR}" 2
|
|
fi
|
|
|
|
if [ "${DIST_DIR}" == "" ]; then
|
|
DIST_DIR="${PROJECT_DIST_DIR}"
|
|
fi
|
|
DIST_DIR=$(realpath "${DIST_DIR}")
|
|
|
|
if [ ! -d "${DIST_DIR}" ]; then
|
|
error_exit "dist directory not found: ${DIST_DIR}" 2
|
|
fi
|
|
|
|
if [ "${DEST_DIR}" == "" ]; then
|
|
error_exit "dest directory not set" 2
|
|
fi
|
|
|
|
if [ ! -d "${DEST_DIR}" ]; then
|
|
error_exit "dest directory not found: ${DEST_DIR}" 2
|
|
fi
|
|
|
|
pushd "${PROJECT_SOURCE_DIR}"
|
|
BRANCH=$(git branch --show-current)
|
|
RELEASE=$(grep set\(PROJECT_RELEASE_ITER ./config.sh | sed s/\)//g | awk '{print $2}')
|
|
popd
|
|
|
|
if [ "${BRANCH}" == "master" ] || [ "${BRANCH}" == "alpha" ] || [ "${BRANCH}" == "beta" ] || [ "${BRANCH}" == "rc" ]; then
|
|
DEST_DIR=${DEST_DIR}/${RELEASE}
|
|
else
|
|
DEST_DIR=${DEST_DIR}/nightly
|
|
fi
|
|
|
|
echo ${DEST_DIR}
|
|
|
|
pushd "${DIST_DIR}"
|
|
if [ ! -f "./${PROJECT_OUT_FILE}" ]; then
|
|
error_exit "failed to find file: ${PROJECT_OUT_FILE}" 1
|
|
fi
|
|
|
|
if [ ! -f "./${PROJECT_OUT_FILE}.sha256" ]; then
|
|
error_exit "failed to find file: ${PROJECT_OUT_FILE}.sha256" 1
|
|
fi
|
|
|
|
if [ "${PROJECT_PRIVATE_KEY}" != "" ] && [ ! -f "./${PROJECT_OUT_FILE}.sig" ]; then
|
|
error_exit "failed to find file: ${PROJECT_OUT_FILE}.sig" 1
|
|
fi
|
|
|
|
cp -f ./${PROJECT_OUT_FILE} ${DEST_DIR} || error_exit "failed to deliver file: ${PROJECT_OUT_FILE}" 1
|
|
cp -f ./${PROJECT_OUT_FILE}.sha256 ${DEST_DIR} || error_exit "failed to deliver file: ${PROJECT_OUT_FILE}.sha256" 1
|
|
if [ "${PROJECT_PRIVATE_KEY}" != "" ]; then
|
|
cp -f ./${PROJECT_OUT_FILE}.sig ${DEST_DIR} || error_exit "failed to deliver file: ${PROJECT_OUT_FILE}.sig" 1
|
|
fi
|
|
popd
|
|
|
|
error_exit "delivered ${PROJECT_FILE_PART}" 0
|