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