mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
release.sh: collect artifacts in intermediate dir
Collect artifacts in "tmp-..." instead of final place. If build fails in the middle, we don't want to leave the artifacts directory with partial result. Also remove the build directory (with Git clone) in the end.
This commit is contained in:
parent
9c138039d2
commit
a889fbecb3
1 changed files with 14 additions and 2 deletions
16
release.sh
16
release.sh
|
|
@ -163,11 +163,16 @@ green " - Checking tag $1"
|
|||
check_tag $1
|
||||
|
||||
PACKAGE=loop
|
||||
ARTIFACTS_DIR="${SCRIPT_DIR}/${PACKAGE}-${TAG}"
|
||||
FINAL_ARTIFACTS_DIR="${SCRIPT_DIR}/${PACKAGE}-${TAG}"
|
||||
ARTIFACTS_DIR="${SCRIPT_DIR}/tmp-${PACKAGE}-${TAG}-$(date +%Y%m%d-%H%M%S)"
|
||||
if [ -d "$ARTIFACTS_DIR" ]; then
|
||||
red "artifacts directory ${ARTIFACTS_DIR} already exists!"
|
||||
exit 1
|
||||
fi
|
||||
if [ -d "$FINAL_ARTIFACTS_DIR" ]; then
|
||||
red "final artifacts directory ${FINAL_ARTIFACTS_DIR} already exists!"
|
||||
exit 1
|
||||
fi
|
||||
green " - Creating artifacts directory ${ARTIFACTS_DIR}"
|
||||
mkdir -p "$ARTIFACTS_DIR"
|
||||
green " - Packaging vendor to ${ARTIFACTS_DIR}/vendor.tar.gz"
|
||||
|
|
@ -232,6 +237,13 @@ for i in $SYS; do
|
|||
done
|
||||
|
||||
cd "$ARTIFACTS_DIR"
|
||||
|
||||
green "- Producing manifest-$TAG.txt"
|
||||
shasum -a 256 * > manifest-$TAG.txt
|
||||
cd ..
|
||||
|
||||
green "- Moving artifacts directory to final place ${FINAL_ARTIFACTS_DIR}"
|
||||
mv "$ARTIFACTS_DIR" "$FINAL_ARTIFACTS_DIR"
|
||||
|
||||
green "- Removing the subdir used for building ${BUILD_DIR}"
|
||||
|
||||
rm -r "$BUILD_DIR"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue