From 63bf76a30a8b3a83e5b1128d26998937c24c9562 Mon Sep 17 00:00:00 2001 From: ritudes <122885572+ritudes@users.noreply.github.com> Date: Tue, 23 May 2023 18:53:50 +0530 Subject: [PATCH] Updating the oudated release script (#6801) * Updating the oudated release script Signed-off-by: Ritu Deshmukh * Update release-bit-verification.sh * Update scripts/release-bit-verification.sh Co-authored-by: Armel Soro * Update scripts/release-bit-verification.sh Co-authored-by: Armel Soro * Update release-bit-verification.sh * Update release-bit-verification.sh * Update release-bit-verification.sh * Update release-bit-verification.sh * Update release-bit-verification.sh --------- Signed-off-by: Ritu Deshmukh Co-authored-by: Armel Soro --- scripts/release-bit-verification.sh | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/scripts/release-bit-verification.sh b/scripts/release-bit-verification.sh index 7f6960e6d..c7fb7fc95 100755 --- a/scripts/release-bit-verification.sh +++ b/scripts/release-bit-verification.sh @@ -11,17 +11,34 @@ # # Example: ./release-bit-verification.sh ~/Downloads/odo-redistributable-2.4.3-1.el8.x86_64.rpm # +#For erroring out in case of error +set -eo pipefail shout() { echo "--------------------------------$1------------------------------------------" } # Check SHASUM for all the binary files and there should be no difference -# Create a Temp directory + + +# Checking for no or invaild arguments +if [ "$#" -lt 1 ] +then + echo "No arguments supplied" + exit 1 +fi + +if [ ! -f ${1} ]; +then + echo "Please enter a valid filepath"; + exit 1 +fi +#Creating an Temp directory WORKING_DIR=$(mktemp -d) shout "WORKING_DIR=$WORKING_DIR" export REPO_URL=${REPO_URL:-"https://github.com/redhat-developer/odo.git"} + # Extract from rpm file rpm2cpio ${1} | cpio -idmvD $WORKING_DIR pushd $WORKING_DIR/usr/share/odo-redistributable/ @@ -67,10 +84,9 @@ fi git clone $REPO_URL odo && cd $WORKING_DIR/odo && git checkout "v$VERSION" #Run tests -make test-integration-devfile -make test-integration -make test-e2e-all -make test-cmd-project +make test-e2e # Cleanup -rm -rf /tmp/odo /tmp/usr +rm -rf "$WORKING_DIR" + +