From ee7960d64ee7f3b20d4ac5cc23e3a0573eed1285 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Thu, 4 Jun 2020 17:24:51 +0200 Subject: [PATCH] .github: fix version format in docker-runc docker-runc ebuild has lines of runc versions with not only underscore (`_`) but also hyphen (`-`). So when we replace the runc version, we need to also care about versions with hyphen, for example, `1.0.0-rc10`. --- .../coreos-overlay/.github/workflows/runc-apply-patch.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh index bd3ed10cb9..bc109a075d 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/runc-apply-patch.sh @@ -28,6 +28,12 @@ runcEbuildNew="app-emulation/docker-runc/docker-runc-${VERSION_NEW}.ebuild" git mv ${runcEbuildOld} ${runcEbuildNew} sed -i "s/${VERSION_OLD}/${VERSION_NEW}/g" ${runcEbuildNew} +# docker-runc ebuild file has also lines of runc versions with '-' instead of '_', e.g. '1.0.0-rc10' +VERSION_OLD_HYPHEN=${VERSION_OLD//_/-} +VERSION_NEW_HYPHEN=${VERSION_NEW//_/-} + +sed -i "s/${VERSION_OLD_HYPHEN}/${VERSION_NEW_HYPHEN}/g" ${runcEbuildNew} + # update also runc versions used by docker and containerd sed -i "s/docker-runc-${VERSION_OLD}/docker-runc-${VERSION_NEW}/g" app-emulation/docker/docker-9999.ebuild sed -i "s/docker-runc-${VERSION_OLD}/docker-runc-${VERSION_NEW}/g" app-emulation/containerd/containerd-9999.ebuild