mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
fix(bootstrap_sdk): skip final release goo if stage4 wasn't built
This commit is contained in:
parent
a21a545f2e
commit
3600615dc8
@ -57,16 +57,17 @@ catalyst_init "$@"
|
||||
check_gsutil_opts
|
||||
catalyst_build
|
||||
|
||||
info "Build complete! Changing output name to something more sensible."
|
||||
build_name="stage4-${ARCH}-${FLAGS_version}.tar.bz2"
|
||||
release_name="${TYPE}-${ARCH}-${FLAGS_version}.tar.bz2"
|
||||
ln -f "$BUILDS/${build_name}" "$BUILDS/${release_name}"
|
||||
ln -f "$BUILDS/${build_name}.CONTENTS" "$BUILDS/${release_name}.CONTENTS"
|
||||
sed -e "s/${build_name}/${release_name}/" \
|
||||
if [[ "$STAGES" =~ stage4 ]]; then
|
||||
info "Build complete! Changing output name to something more sensible."
|
||||
build_name="stage4-${ARCH}-${FLAGS_version}.tar.bz2"
|
||||
release_name="${TYPE}-${ARCH}-${FLAGS_version}.tar.bz2"
|
||||
ln -f "$BUILDS/${build_name}" "$BUILDS/${release_name}"
|
||||
ln -f "$BUILDS/${build_name}.CONTENTS" "$BUILDS/${release_name}.CONTENTS"
|
||||
sed -e "s/${build_name}/${release_name}/" \
|
||||
"$BUILDS/${build_name}.DIGESTS" > "$BUILDS/${release_name}.DIGESTS"
|
||||
|
||||
# Validate we didn't break the DIGESTS with sed
|
||||
for hash_type in md5 sha1 sha512; do
|
||||
# Validate we didn't break the DIGESTS with sed
|
||||
for hash_type in md5 sha1 sha512; do
|
||||
info "Validating ${hash_type} DIGESTS"
|
||||
# shash is what's used to generate these multi-hash digests but it
|
||||
# doesn't exit with non-zero on failure. I mean seriously...
|
||||
@ -76,13 +77,14 @@ for hash_type in md5 sha1 sha512; do
|
||||
(cd "$BUILDS" && grep -A1 -i "^# ${hash_type} HASH$" \
|
||||
"${release_name}.DIGESTS" | grep -v '^--$' | \
|
||||
${hash_type}sum -c - --strict)
|
||||
done
|
||||
done
|
||||
|
||||
info "SDK ready: $BUILDS/${release_name}"
|
||||
info "SDK ready: $BUILDS/${release_name}"
|
||||
|
||||
def_upload_path="${UPLOAD_ROOT}/sdk/${ARCH}/${FLAGS_version}"
|
||||
upload_files "tarball" "${def_upload_path}" "" "$BUILDS/${release_name}" \
|
||||
def_upload_path="${UPLOAD_ROOT}/sdk/${ARCH}/${FLAGS_version}"
|
||||
upload_files "tarball" "${def_upload_path}" "" "$BUILDS/${release_name}" \
|
||||
"$BUILDS/${release_name}.CONTENTS" "$BUILDS/${release_name}.DIGESTS"
|
||||
upload_files "packages" "${def_upload_path}" "pkgs/" "${BINPKGS}"/*
|
||||
upload_files "packages" "${def_upload_path}" "pkgs/" "${BINPKGS}"/*
|
||||
fi
|
||||
|
||||
command_completed
|
||||
|
Loading…
Reference in New Issue
Block a user