ta: iso deploy: Fix artifact name in checksum file 49/2049/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 25 Nov 2019 18:12:14 +0000 (19:12 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 25 Nov 2019 18:12:14 +0000 (19:12 +0100)
On non-x86_64 platforms, we rename the artifacts (and their
corresponding checksum files) to include the platform architecture
in their names.

However, the contents of the checksum files should also be updated
to reflect the new artifact naming.

Change-Id: I2fb2fc8feb6299f3ee2dc26cc2fe7df929e4509a
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
jjb/shell/ta-iso-deploy.sh

index c9d5559..1ec4731 100644 (file)
@@ -27,10 +27,12 @@ nexus_repo_url="$NEXUS_URL/content/repositories/$NEXUS_REPO"
 mkdir -p "$upload_dir1"
 mkdir -p "$upload_dir2"
 
-if [ "$(uname -m)" != 'x86_64' ]; then
+platform_arch=$(uname -m)
+if [ "${platform_arch}" != 'x86_64' ]; then
     # On non-x86 architecture, rename the artifacts appropiately
     pushd "$WORKSPACE/work/results/images/"
-    rename "s/\./.$(uname -m)./" *.*
+    rename "s/\./.${platform_arch}./" *.*
+    sed -i "s/\./.${platform_arch}./" *."${platform_arch}".iso.*
     popd
 fi