mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
containerd-apply-patch: updated to work with upstream ebuilds
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This commit is contained in:
parent
a256fa6443
commit
b3b08e0e64
20
.github/workflows/containerd-apply-patch.sh
vendored
20
.github/workflows/containerd-apply-patch.sh
vendored
@ -21,12 +21,17 @@ fi
|
||||
|
||||
# we need to update not only the main ebuild file, but also its CONTAINERD_COMMIT,
|
||||
# which needs to point to COMMIT_HASH that matches with $VERSION_NEW from upstream containerd.
|
||||
containerdEbuildOldSymlink=$(get_ebuild_filename app-containers/containerd "${VERSION_OLD}")
|
||||
containerdEbuildNewSymlink="app-containers/containerd/containerd-${VERSION_NEW}.ebuild"
|
||||
containerdEbuildMain="app-containers/containerd/containerd-9999.ebuild"
|
||||
git mv "${containerdEbuildOldSymlink}" "${containerdEbuildNewSymlink}"
|
||||
sed -i "s/CONTAINERD_COMMIT=\"\(.*\)\"/CONTAINERD_COMMIT=\"${COMMIT_HASH}\"/g" "${containerdEbuildMain}"
|
||||
sed -i "s/v${VERSION_OLD}/v${VERSION_NEW}/g" "${containerdEbuildMain}"
|
||||
containerdEbuildOld=$(get_ebuild_filename app-containers/containerd "${VERSION_OLD}")
|
||||
containerdEbuildNew="app-containers/containerd/containerd-${VERSION_NEW}.ebuild"
|
||||
git mv "${containerdEbuildOld}" "${containerdEbuildNew}"
|
||||
sed -i "s/GIT_REVISION=.*/GIT_REVISION=${COMMIT_HASH}/g" "${containerdEbuildNew}"
|
||||
|
||||
# The ebuild is masked by default to maintain compatibility with Gentoo upstream
|
||||
# so we add an unmask for Flatcar only.
|
||||
keywords_file="profiles/coreos/base/package.accept_keywords"
|
||||
ts=$(date +'%Y-%m-%d %H:%M:%S')
|
||||
comment="DO NOT EDIT THIS LINE. Added by containerd-apply-patch.sh on ${ts}"
|
||||
sed -i "s;^\(=app-containers/containerd\)-${VERSION_OLD} .*;\1-${VERSION_NEW} ~amd64 ~arm64 # ${comment};" "${keywords_file}"
|
||||
|
||||
popd
|
||||
|
||||
@ -34,7 +39,8 @@ URL="https://github.com/containerd/containerd/releases/tag/v${VERSION_NEW}"
|
||||
|
||||
generate_update_changelog 'containerd' "${VERSION_NEW}" "${URL}" 'containerd'
|
||||
|
||||
commit_changes app-containers/containerd "${VERSION_OLD}" "${VERSION_NEW}"
|
||||
# Commit package changes and updated keyword file
|
||||
commit_changes app-containers/containerd "${VERSION_OLD}" "${VERSION_NEW}" "${keywords_file}"
|
||||
|
||||
cleanup_repo
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user