build_image: generate update tools zip by default

Missed this in 7231b95a, the update zip should still be built when the
usr partition is extracted for generating updates but build_image itself
is not generating and signing the update.
This commit is contained in:
Michael Marineau 2014-06-24 14:01:09 -07:00
parent 82e2461ddf
commit 51c78a4685
2 changed files with 19 additions and 6 deletions

View File

@ -171,6 +171,12 @@ if [[ "${PROD_IMAGE}" -eq 1 ]]; then
fi
fi
if [[ ${FLAGS_generate_update} -eq ${FLAGS_TRUE} ]] || \
[[ ${FLAGS_extract_update} -eq ${FLAGS_TRUE} ]]
then
zip_update_tools
fi
# Write out a version.txt file, this will be used by image_to_vm.sh
tee "${BUILD_DIR}/version.txt" <<EOF
COREOS_BUILD=${COREOS_BUILD}

View File

@ -64,6 +64,19 @@ extract_update() {
upload_image "${update_path}"
}
zip_update_tools() {
# There isn't a 'dev' variant of this zip, so always call it production.
local update_zip="coreos_production_update.zip"
info "Generating update tools zip"
# Make sure some vars this script needs are exported
export REPO_MANIFESTS_DIR SCRIPTS_DIR
"${BUILD_LIBRARY_DIR}/generate_au_zip.py" \
--output-dir "${BUILD_DIR}" --zip-name "${update_zip}"
upload_image "${BUILD_DIR}/${update_zip}"
}
generate_update() {
local image_name="$1"
local disk_layout="$2"
@ -79,12 +92,6 @@ generate_update() {
delta_generator -private_key "${devkey}" \
-in_file "${update}.gz" -out_metadata "${update}.meta"
info "Generating update tools zip"
# Make sure some vars this script needs are exported
export REPO_MANIFESTS_DIR SCRIPTS_DIR
"${BUILD_LIBRARY_DIR}/generate_au_zip.py" \
--output-dir "${BUILD_DIR}" --zip-name "${update_prefix}.zip"
upload_image -d "${update}.DIGESTS" "${update}".{bin,gz,meta,zip}
}