mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
fix(image_set_group): Add support for uploading images.
This commit is contained in:
parent
28482f8dfa
commit
d11528ca98
@ -66,7 +66,7 @@ fi
|
||||
|
||||
# Source should include version.txt, switch to its version information
|
||||
if [[ ! -f "${FLAGS_from}/version.txt" ]]; then
|
||||
die_notrace "Source version info does not exist: ${SRC_IMAGE}"
|
||||
die_notrace "Source version info does not exist: ${FLAGS_from}/version.txt"
|
||||
fi
|
||||
source "${FLAGS_from}/version.txt"
|
||||
COREOS_VERSION_STRING="${COREOS_VERSION}"
|
||||
@ -97,8 +97,8 @@ info "Copying from ${FLAGS_from}"
|
||||
cp "${SRC_IMAGE}" "${DST_IMAGE}"
|
||||
cp "${FLAGS_from}/version.txt" "${BUILD_DIR}/version.txt"
|
||||
UPDATE_PREFIX="${COREOS_PRODUCTION_IMAGE_NAME%_image.bin}_update"
|
||||
if [[ -e "${FLAGS_from}/${UPDATE_PREFIX}"* ]]; then
|
||||
cp "${FLAGS_from}/${UPDATE_PREFIX}"* "${BUILD_DIR}/"
|
||||
if [[ -e "${FLAGS_from}/${UPDATE_PREFIX}.bin" ]]; then
|
||||
cp "${FLAGS_from}/${UPDATE_PREFIX}".{bin,gz,meta,zip} "${BUILD_DIR}/"
|
||||
fi
|
||||
|
||||
"${BUILD_LIBRARY_DIR}/disk_util" --disk_layout="${FLAGS_disk_layout}" \
|
||||
@ -114,7 +114,12 @@ EOF
|
||||
cleanup_mounts "${ROOT_FS_DIR}"
|
||||
trap - EXIT
|
||||
|
||||
# TODO: Upload here
|
||||
upload_image "${DST_IMAGE}"
|
||||
upload_image "${BUILD_DIR}/version.txt"
|
||||
if [[ -e "${BUILD_DIR}/${UPDATE_PREFIX}.bin" ]]; then
|
||||
upload_image -d "${BUILD_DIR}/${UPDATE_PREFIX}.DIGESTS" \
|
||||
"${BUILD_DIR}/${UPDATE_PREFIX}".{bin,gz,meta,zip}
|
||||
fi
|
||||
|
||||
set_build_symlinks "${FLAGS_group}-latest"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user