Browse code

Merge "Do not upload vhdx images as vhd"

Jenkins authored on 2017/05/27 04:33:35
Showing 1 changed files
... ...
@@ -323,7 +323,7 @@ function upload_image {
323 323
         *.vhd|*.vhdx|*.vhd.gz|*.vhdx.gz)
324 324
             local extension="${image_fname#*.}"
325 325
             image_name=$(basename "$image" ".$extension")
326
-            disk_format=vhd
326
+            disk_format=$(echo $image_fname | grep -oP '(?<=\.)vhdx?(?=\.|$)')
327 327
             container_format=bare
328 328
             if [ "${image_fname##*.}" == "gz" ]; then
329 329
                 unpack=zcat