mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-21 21:51:57 +02:00
*: drop usage of COREOS_VERSION_STRING
This variable was semi-deprecated ages ago so `version.txt` could follow a similar variable naming pattern to `os-release`. Finally drop usage of it here in favor of `$COREOS_VERSION`.
This commit is contained in:
parent
bc2703d6e4
commit
5ba4c7181d
@ -58,7 +58,7 @@ catalyst_init "$@"
|
|||||||
check_gsutil_opts
|
check_gsutil_opts
|
||||||
|
|
||||||
if [[ "$STAGES" =~ stage4 ]]; then
|
if [[ "$STAGES" =~ stage4 ]]; then
|
||||||
info "Setting release to ${COREOS_VERSION_STRING}"
|
info "Setting release to ${COREOS_VERSION}"
|
||||||
rm -rf "${TEMPDIR}/stage4_overlay"
|
rm -rf "${TEMPDIR}/stage4_overlay"
|
||||||
# need to setup the lib->lib64 symlink correctly
|
# need to setup the lib->lib64 symlink correctly
|
||||||
libdir=$(get_sdk_libdir)
|
libdir=$(get_sdk_libdir)
|
||||||
|
@ -187,7 +187,7 @@ tee "${BUILD_DIR}/version.txt" <<EOF
|
|||||||
COREOS_BUILD=${SPLIT[0]}
|
COREOS_BUILD=${SPLIT[0]}
|
||||||
COREOS_BRANCH=${SPLIT[1]}
|
COREOS_BRANCH=${SPLIT[1]}
|
||||||
COREOS_PATCH=${SPLIT[2]}
|
COREOS_PATCH=${SPLIT[2]}
|
||||||
COREOS_VERSION=${COREOS_VERSION_STRING}
|
COREOS_VERSION=${COREOS_VERSION}
|
||||||
COREOS_VERSION_ID=${COREOS_VERSION_ID}
|
COREOS_VERSION_ID=${COREOS_VERSION_ID}
|
||||||
COREOS_BUILD_ID="${COREOS_BUILD_ID}"
|
COREOS_BUILD_ID="${COREOS_BUILD_ID}"
|
||||||
COREOS_SDK_VERSION=${COREOS_SDK_VERSION}
|
COREOS_SDK_VERSION=${COREOS_SDK_VERSION}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# Use canonical path since some tools (e.g. mount) do not like symlinks.
|
# Use canonical path since some tools (e.g. mount) do not like symlinks.
|
||||||
# Append build attempt to output directory.
|
# Append build attempt to output directory.
|
||||||
if [ -z "${FLAGS_version}" ]; then
|
if [ -z "${FLAGS_version}" ]; then
|
||||||
IMAGE_SUBDIR="${FLAGS_group}-${COREOS_VERSION_STRING}-a${FLAGS_build_attempt}"
|
IMAGE_SUBDIR="${FLAGS_group}-${COREOS_VERSION}-a${FLAGS_build_attempt}"
|
||||||
else
|
else
|
||||||
IMAGE_SUBDIR="${FLAGS_group}-${FLAGS_version}"
|
IMAGE_SUBDIR="${FLAGS_group}-${FLAGS_version}"
|
||||||
fi
|
fi
|
||||||
|
@ -34,7 +34,7 @@ DEFINE_string coreos_overlay "${SRC_ROOT}/third_party/coreos-overlay" \
|
|||||||
"Path to the coreos-overlay git checkout."
|
"Path to the coreos-overlay git checkout."
|
||||||
DEFINE_string seed_tarball "${DEFAULT_SEED}" \
|
DEFINE_string seed_tarball "${DEFAULT_SEED}" \
|
||||||
"Path to an existing stage tarball to start from."
|
"Path to an existing stage tarball to start from."
|
||||||
DEFINE_string version "${COREOS_VERSION_STRING}" \
|
DEFINE_string version "${COREOS_VERSION}" \
|
||||||
"Version to use for portage snapshot and stage tarballs."
|
"Version to use for portage snapshot and stage tarballs."
|
||||||
DEFINE_string profile "${DEFAULT_PROFILE}" \
|
DEFINE_string profile "${DEFAULT_PROFILE}" \
|
||||||
"Portage profile, may be prefixed with repo:"
|
"Portage profile, may be prefixed with repo:"
|
||||||
|
@ -130,7 +130,7 @@ upload_packages() {
|
|||||||
[[ -n "${BOARD}" ]] || die "board_options.sh must be sourced first"
|
[[ -n "${BOARD}" ]] || die "board_options.sh must be sourced first"
|
||||||
|
|
||||||
local board_packages="${1:-"${BOARD_ROOT}/packages"}"
|
local board_packages="${1:-"${BOARD_ROOT}/packages"}"
|
||||||
local def_upload_path="${UPLOAD_ROOT}/boards/${BOARD}/${COREOS_VERSION_STRING}"
|
local def_upload_path="${UPLOAD_ROOT}/boards/${BOARD}/${COREOS_VERSION}"
|
||||||
upload_files packages ${def_upload_path} "pkgs/" "${board_packages}"/*
|
upload_files packages ${def_upload_path} "pkgs/" "${board_packages}"/*
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ upload_image() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local log_msg=$(basename "$digests" .DIGESTS)
|
local log_msg=$(basename "$digests" .DIGESTS)
|
||||||
local def_upload_path="${UPLOAD_ROOT}/boards/${BOARD}/${COREOS_VERSION_STRING}"
|
local def_upload_path="${UPLOAD_ROOT}/boards/${BOARD}/${COREOS_VERSION}"
|
||||||
sign_and_upload_files "${log_msg}" "${def_upload_path}" "" "${uploads[@]}"
|
sign_and_upload_files "${log_msg}" "${def_upload_path}" "" "${uploads[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,9 +207,9 @@ download_image_url() {
|
|||||||
download_path="${FLAGS_download_path%%/}"
|
download_path="${FLAGS_download_path%%/}"
|
||||||
elif [[ "${download_root}" = *release.core-os.net* ]]; then
|
elif [[ "${download_root}" = *release.core-os.net* ]]; then
|
||||||
# Official release download paths don't include the boards directory
|
# Official release download paths don't include the boards directory
|
||||||
download_path="${download_root%%/}/${BOARD}/${COREOS_VERSION_STRING}"
|
download_path="${download_root%%/}/${BOARD}/${COREOS_VERSION}"
|
||||||
else
|
else
|
||||||
download_path="${download_root%%/}/boards/${BOARD}/${COREOS_VERSION_STRING}"
|
download_path="${download_root%%/}/boards/${BOARD}/${COREOS_VERSION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Just in case download_root was set from UPLOAD_ROOT
|
# Just in case download_root was set from UPLOAD_ROOT
|
||||||
|
@ -31,9 +31,9 @@ COREOS_VERSION_NAME="CoreOS"
|
|||||||
sudo mkdir -p "${ROOT_FS_DIR}/usr/share/coreos" "${ROOT_FS_DIR}/etc/coreos"
|
sudo mkdir -p "${ROOT_FS_DIR}/usr/share/coreos" "${ROOT_FS_DIR}/etc/coreos"
|
||||||
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/lsb-release" <<EOF
|
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/lsb-release" <<EOF
|
||||||
DISTRIB_ID=$COREOS_VERSION_NAME
|
DISTRIB_ID=$COREOS_VERSION_NAME
|
||||||
DISTRIB_RELEASE=$COREOS_VERSION_STRING
|
DISTRIB_RELEASE=$COREOS_VERSION
|
||||||
DISTRIB_CODENAME="Red Dog"
|
DISTRIB_CODENAME="Red Dog"
|
||||||
DISTRIB_DESCRIPTION="$COREOS_VERSION_NAME $COREOS_VERSION_STRING"
|
DISTRIB_DESCRIPTION="$COREOS_VERSION_NAME $COREOS_VERSION"
|
||||||
EOF
|
EOF
|
||||||
sudo ln -sf "../usr/share/coreos/lsb-release" "${ROOT_FS_DIR}/etc/lsb-release"
|
sudo ln -sf "../usr/share/coreos/lsb-release" "${ROOT_FS_DIR}/etc/lsb-release"
|
||||||
|
|
||||||
@ -43,10 +43,10 @@ OS_ID=$(tr '[:upper:]' '[:lower:]' <<<"$COREOS_VERSION_NAME")
|
|||||||
sudo_clobber "${ROOT_FS_DIR}/usr/lib/os-release" <<EOF
|
sudo_clobber "${ROOT_FS_DIR}/usr/lib/os-release" <<EOF
|
||||||
NAME=$COREOS_VERSION_NAME
|
NAME=$COREOS_VERSION_NAME
|
||||||
ID=$OS_ID
|
ID=$OS_ID
|
||||||
VERSION=$COREOS_VERSION_STRING
|
VERSION=$COREOS_VERSION
|
||||||
VERSION_ID=$COREOS_VERSION_ID
|
VERSION_ID=$COREOS_VERSION_ID
|
||||||
BUILD_ID=$COREOS_BUILD_ID
|
BUILD_ID=$COREOS_BUILD_ID
|
||||||
PRETTY_NAME="$COREOS_VERSION_NAME $COREOS_VERSION_STRING"
|
PRETTY_NAME="$COREOS_VERSION_NAME $COREOS_VERSION"
|
||||||
ANSI_COLOR="1;32"
|
ANSI_COLOR="1;32"
|
||||||
HOME_URL="https://coreos.com/"
|
HOME_URL="https://coreos.com/"
|
||||||
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"
|
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"
|
||||||
@ -56,7 +56,7 @@ sudo ln -sf "../../lib/os-release" "${ROOT_FS_DIR}/usr/share/coreos/os-release"
|
|||||||
|
|
||||||
# Create the defaults for the coreos configuration files in the usr directory
|
# Create the defaults for the coreos configuration files in the usr directory
|
||||||
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/release" <<EOF
|
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/release" <<EOF
|
||||||
COREOS_RELEASE_VERSION=$COREOS_VERSION_STRING
|
COREOS_RELEASE_VERSION=$COREOS_VERSION
|
||||||
COREOS_RELEASE_BOARD=$FLAGS_board
|
COREOS_RELEASE_BOARD=$FLAGS_board
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ set_vm_paths() {
|
|||||||
VM_TMP_DIR="${dst_dir}/${dst_name}.vmtmpdir"
|
VM_TMP_DIR="${dst_dir}/${dst_name}.vmtmpdir"
|
||||||
VM_TMP_IMG="${VM_TMP_DIR}/disk_image.bin"
|
VM_TMP_IMG="${VM_TMP_DIR}/disk_image.bin"
|
||||||
VM_TMP_ROOT="${VM_TMP_DIR}/rootfs"
|
VM_TMP_ROOT="${VM_TMP_DIR}/rootfs"
|
||||||
VM_NAME="$(_src_to_dst_name "${src_name}" "")-${COREOS_VERSION_STRING}"
|
VM_NAME="$(_src_to_dst_name "${src_name}" "")-${COREOS_VERSION}"
|
||||||
VM_README="${dst_dir}/$(_src_to_dst_name "${src_name}" ".README")"
|
VM_README="${dst_dir}/$(_src_to_dst_name "${src_name}" ".README")"
|
||||||
|
|
||||||
# Make VM_NAME safe for use as a hostname
|
# Make VM_NAME safe for use as a hostname
|
||||||
@ -1127,7 +1127,7 @@ vm_upload() {
|
|||||||
cp "${digests}.asc" "${legacy_digests}.asc"
|
cp "${digests}.asc" "${legacy_digests}.asc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local def_upload_path="${UPLOAD_ROOT}/boards/${BOARD}/${COREOS_VERSION_STRING}"
|
local def_upload_path="${UPLOAD_ROOT}/boards/${BOARD}/${COREOS_VERSION}"
|
||||||
upload_files "$(_dst_name)" "${def_upload_path}" "" "${legacy_uploads[@]}"
|
upload_files "$(_dst_name)" "${def_upload_path}" "" "${legacy_uploads[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ export GCLIENT_ROOT=$(readlink -f "${SCRIPT_ROOT}/../../")
|
|||||||
|
|
||||||
DEFINE_string board "amd64-usr" \
|
DEFINE_string board "amd64-usr" \
|
||||||
"Board type of the image"
|
"Board type of the image"
|
||||||
DEFINE_string version "${COREOS_VERSION_STRING}" \
|
DEFINE_string version "${COREOS_VERSION}" \
|
||||||
"Version number to promote."
|
"Version number to promote."
|
||||||
|
|
||||||
DEFINE_string build_storage "gs://builds.release.core-os.net" \
|
DEFINE_string build_storage "gs://builds.release.core-os.net" \
|
||||||
|
@ -12,7 +12,7 @@ export GCLIENT_ROOT=$(readlink -f "${SCRIPT_ROOT}/../../")
|
|||||||
|
|
||||||
DEFINE_string board "amd64-usr" \
|
DEFINE_string board "amd64-usr" \
|
||||||
"Board type of the image"
|
"Board type of the image"
|
||||||
DEFINE_string version "${COREOS_VERSION_STRING}" \
|
DEFINE_string version "${COREOS_VERSION}" \
|
||||||
"Version number to promote."
|
"Version number to promote."
|
||||||
DEFINE_string channel "alpha" \
|
DEFINE_string channel "alpha" \
|
||||||
"Roller channel to promote this version to."
|
"Roller channel to promote this version to."
|
||||||
|
@ -14,7 +14,7 @@ DEFINE_string board "amd64-usr" \
|
|||||||
"Board type of the image"
|
"Board type of the image"
|
||||||
DEFINE_string payload "coreos_production_update.gz" \
|
DEFINE_string payload "coreos_production_update.gz" \
|
||||||
"Path to the update payload"
|
"Path to the update payload"
|
||||||
DEFINE_string version "${COREOS_VERSION_STRING}" \
|
DEFINE_string version "${COREOS_VERSION}" \
|
||||||
"Version number of this build."
|
"Version number of this build."
|
||||||
DEFINE_string app_id "e96281a6-d1af-4bde-9a0a-97b76e56dc57" \
|
DEFINE_string app_id "e96281a6-d1af-4bde-9a0a-97b76e56dc57" \
|
||||||
"CoreOS AppId in roller."
|
"CoreOS AppId in roller."
|
||||||
|
@ -158,14 +158,14 @@ fi
|
|||||||
|
|
||||||
info "Updating chroot:"
|
info "Updating chroot:"
|
||||||
info " chroot version: $OLDVER"
|
info " chroot version: $OLDVER"
|
||||||
info " CoreOS version: $COREOS_VERSION_STRING"
|
info " CoreOS version: $COREOS_VERSION"
|
||||||
|
|
||||||
# Updates should be of the form 1.2.3_desc.sh
|
# Updates should be of the form 1.2.3_desc.sh
|
||||||
for update_script in ${SCRIPTS_DIR}/sdk_lib/updates/*.sh; do
|
for update_script in ${SCRIPTS_DIR}/sdk_lib/updates/*.sh; do
|
||||||
update_name="${update_script##*/}"
|
update_name="${update_script##*/}"
|
||||||
update_ver="${update_name%%_*}"
|
update_ver="${update_name%%_*}"
|
||||||
# Run newer updates but don't pass our current version
|
# Run newer updates but don't pass our current version
|
||||||
if ! cmp_ver le "$update_ver" "$COREOS_VERSION_STRING"; then
|
if ! cmp_ver le "$update_ver" "$COREOS_VERSION"; then
|
||||||
warn "Skipping update from the future: $update_name"
|
warn "Skipping update from the future: $update_name"
|
||||||
warn "Perhaps it is time to run a repo sync?"
|
warn "Perhaps it is time to run a repo sync?"
|
||||||
elif ! cmp_ver ge "$OLDVER" "$update_ver"; then
|
elif ! cmp_ver ge "$OLDVER" "$update_ver"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user