From 08ea76673f4dfc4cc690ff0788a2966dad864e89 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Thu, 22 Jul 2021 15:31:20 +0200 Subject: [PATCH] .github: list only ebuilds with a unique VERSION_OLD Due to unnecessary wildcard listings, ebuild files including all rc or beta are being listed. Since `VERSION_OLD` is already generated as a unique version, we do not need to list multiple files to filter by running `head -n1` etc. We just need to use only the specific ebuild. Simply list only the unique ebuild file. --- .../coreos-overlay/.github/workflows/containerd-apply-patch.sh | 2 +- .../coreos-overlay/.github/workflows/docker-apply-patch.sh | 2 +- .../coreos-overlay/.github/workflows/firmware-apply-patch.sh | 2 +- .../coreos-overlay/.github/workflows/go-apply-patch.sh | 2 +- .../coreos-overlay/.github/workflows/runc-apply-patch.sh | 2 +- .../coreos-overlay/.github/workflows/rust-apply-patch.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh index 800ac0cf89..0b75aece95 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/containerd-apply-patch.sh @@ -24,7 +24,7 @@ DOCKER_VERSION=$(sed -n "s/^DIST docker-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-e # 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=$(ls -1 app-emulation/containerd/containerd-${VERSION_OLD}*.ebuild | sort -ruV | head -n1) +containerdEbuildOldSymlink=$(ls -1 app-emulation/containerd/containerd-${VERSION_OLD}.ebuild) containerdEbuildNewSymlink="app-emulation/containerd/containerd-${VERSION_NEW}.ebuild" containerdEbuildMain="app-emulation/containerd/containerd-9999.ebuild" git mv ${containerdEbuildOldSymlink} ${containerdEbuildNewSymlink} diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh index 62a98d5943..eb1b641ef1 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh @@ -22,7 +22,7 @@ fi # we need to update not only the main ebuild file, but also its DOCKER_GITCOMMIT, # which needs to point to COMMIT_HASH that matches with $VERSION_NEW from upstream docker-ce. -dockerEbuildOldSymlink=$(ls -1 app-emulation/docker/docker-${VERSION_OLD}*.ebuild | sort -ruV | head -n1) +dockerEbuildOldSymlink=$(ls -1 app-emulation/docker/docker-${VERSION_OLD}.ebuild) dockerEbuildNewSymlink="app-emulation/docker/docker-${VERSION_NEW}.ebuild" dockerEbuildMain="app-emulation/docker/docker-9999.ebuild" git mv ${dockerEbuildOldSymlink} ${dockerEbuildNewSymlink} diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh index 7f1e8f9227..35a7749241 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/firmware-apply-patch.sh @@ -21,7 +21,7 @@ if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then exit 0 fi -git mv $(ls -1 sys-kernel/coreos-firmware/coreos-firmware-${VERSION_OLD}*.ebuild | sort -ruV | head -n1) "sys-kernel/coreos-firmware/coreos-firmware-${VERSION_NEW}.ebuild" +git mv $(ls -1 sys-kernel/coreos-firmware/coreos-firmware-${VERSION_OLD}.ebuild) "sys-kernel/coreos-firmware/coreos-firmware-${VERSION_NEW}.ebuild" popd >/dev/null || exit diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh index 8e958353c5..b9f2d739c2 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/go-apply-patch.sh @@ -25,7 +25,7 @@ if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then exit 0 fi -git mv $(ls -1 dev-lang/go/go-${VERSION_OLD}*.ebuild | sort -ruV | head -n1) "dev-lang/go/go-${VERSION_NEW}.ebuild" +git mv $(ls -1 dev-lang/go/go-${VERSION_OLD}.ebuild) "dev-lang/go/go-${VERSION_NEW}.ebuild" popd >/dev/null || exit 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 20de4e4cff..a4a955053e 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 @@ -23,7 +23,7 @@ if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then exit 0 fi -runcEbuildOld=$(ls -1 app-emulation/docker-runc/docker-runc-${VERSION_OLD}*.ebuild | sort -ruV | head -n1) +runcEbuildOld=$(ls -1 app-emulation/docker-runc/docker-runc-${VERSION_OLD}.ebuild) runcEbuildNew="app-emulation/docker-runc/docker-runc-${VERSION_NEW}.ebuild" git mv ${runcEbuildOld} ${runcEbuildNew} sed -i "s/${VERSION_OLD}/${VERSION_NEW}/g" ${runcEbuildNew} diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh index 959d7d86d6..a4855b4ae3 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh @@ -24,7 +24,7 @@ fi find profiles -name 'package.*' | xargs sed -i "s/=dev-lang\/rust-${VERSION_OLD}/=dev-lang\/rust-${VERSION_NEW}/" pushd "dev-lang/rust" >/dev/null || exit -git mv $(ls -1 rust-${VERSION_OLD}*.ebuild | sort -ruV | head -n1) "rust-${VERSION_NEW}.ebuild" +git mv $(ls -1 rust-${VERSION_OLD}.ebuild) "rust-${VERSION_NEW}.ebuild" popd >/dev/null || exit popd >/dev/null || exit