diff mbox series

[isar-cip-core,Resend,1/4] scripts/deploy-cip-core.sh: Fix uploading tar.gz image

Message ID 20210510014011.66494-1-nobuhiro1.iwamatsu@toshiba.co.jp (mailing list archive)
State Handled Elsewhere
Headers show
Series [isar-cip-core,Resend,1/4] scripts/deploy-cip-core.sh: Fix uploading tar.gz image | expand

Commit Message

Nobuhiro Iwamatsu May 10, 2021, 1:40 a.m. UTC
Since *.wic.img is always compressed, if this file does not exist (for
example, the extension is tar.gz), the image file upload will fail.
This will check for the extension of the file.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
 scripts/deploy-cip-core.sh | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Comments

Jan Kiszka May 11, 2021, 1:30 p.m. UTC | #1
On 10.05.21 03:40, Nobuhiro Iwamatsu wrote:
> Since *.wic.img is always compressed, if this file does not exist (for
> example, the extension is tar.gz), the image file upload will fail.
> This will check for the extension of the file.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
>  scripts/deploy-cip-core.sh | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
> index 5b7eab9..3593d51 100755
> --- a/scripts/deploy-cip-core.sh
> +++ b/scripts/deploy-cip-core.sh
> @@ -24,14 +24,17 @@ if [ "${EXTENSION}" != "base" ] ; then
>  	BASE_PATH=build/tmp/deploy/images/$TARGET/cip-core-image-cip-core-$RELEASE-$TARGET-$EXTENSION
>  fi
>  
> -echo "Compressing cip-core-image-cip-core-$RELEASE-$TARGET.wic.img..."
> -xz -9 -k $BASE_PATH.wic.img
> +if [ -f $BASE_PATH.wic.img ] ; then
> +	echo "Compressing cip-core-image-cip-core-$RELEASE-$TARGET.wic.img..."
> +	xz -9 -k $BASE_PATH.wic.img
>  
> -echo "Uploading artifacts..."
> -aws s3 cp --no-progress $BASE_PATH.wic.img.xz s3://download.cip-project.org/cip-core/$TARGET/
> +	echo "Uploading artifacts..."
> +	aws s3 cp --no-progress $BASE_PATH.wic.img.xz s3://download.cip-project.org/cip-core/$TARGET/
> +fi
>  
>  if [ -f $BASE_PATH.tar.gz ]; then
> -    aws s3 cp --no-progress $BASE_PATH.tar.gz s3://download.cip-project.org/cip-core/$TARGET/
> +	echo "Uploading artifacts..."
> +	aws s3 cp --no-progress $BASE_PATH.tar.gz s3://download.cip-project.org/cip-core/$TARGET/
>  fi
>  
>  KERNEL_IMAGE=$BASE_PATH-vmlinuz
> 
> 

Thanks, all 4 applied.

Jan
diff mbox series

Patch

diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
index 5b7eab9..3593d51 100755
--- a/scripts/deploy-cip-core.sh
+++ b/scripts/deploy-cip-core.sh
@@ -24,14 +24,17 @@  if [ "${EXTENSION}" != "base" ] ; then
 	BASE_PATH=build/tmp/deploy/images/$TARGET/cip-core-image-cip-core-$RELEASE-$TARGET-$EXTENSION
 fi
 
-echo "Compressing cip-core-image-cip-core-$RELEASE-$TARGET.wic.img..."
-xz -9 -k $BASE_PATH.wic.img
+if [ -f $BASE_PATH.wic.img ] ; then
+	echo "Compressing cip-core-image-cip-core-$RELEASE-$TARGET.wic.img..."
+	xz -9 -k $BASE_PATH.wic.img
 
-echo "Uploading artifacts..."
-aws s3 cp --no-progress $BASE_PATH.wic.img.xz s3://download.cip-project.org/cip-core/$TARGET/
+	echo "Uploading artifacts..."
+	aws s3 cp --no-progress $BASE_PATH.wic.img.xz s3://download.cip-project.org/cip-core/$TARGET/
+fi
 
 if [ -f $BASE_PATH.tar.gz ]; then
-    aws s3 cp --no-progress $BASE_PATH.tar.gz s3://download.cip-project.org/cip-core/$TARGET/
+	echo "Uploading artifacts..."
+	aws s3 cp --no-progress $BASE_PATH.tar.gz s3://download.cip-project.org/cip-core/$TARGET/
 fi
 
 KERNEL_IMAGE=$BASE_PATH-vmlinuz