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 12cf6af095..3386413e5f 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 @@ -10,11 +10,11 @@ git -C ~/flatcar-sdk/src/third_party/portage-stable checkout -B "${BASE_BRANCH}" pushd ~/flatcar-sdk/src/third_party/coreos-overlay >/dev/null || exit git checkout -B "${branch}" "github/${BASE_BRANCH}" -versionOld=$(sed -n "s/^DIST go\(${GO_VERSION}.[0-9]*\).*/\1/p" dev-lang/go/Manifest | sort -ruV | head -n1) -[[ "${VERSION_NEW}" = "${versionOld}" ]] && echo "already the latest Go, nothing to do" && exit +VERSION_OLD=$(sed -n "s/^DIST go\(${GO_VERSION}.[0-9]*\).*/\1/p" dev-lang/go/Manifest | sort -ruV | head -n1) +[[ "${VERSION_NEW}" = "${VERSION_OLD}" ]] && echo "already the latest Go, nothing to do" && exit pushd "dev-lang/go" >/dev/null || exit -git mv $(ls -1 go-${versionOld}*.ebuild | sort -ruV | head -n1) "go-${VERSION_NEW}.ebuild" +git mv $(ls -1 go-${VERSION_OLD}*.ebuild | sort -ruV | head -n1) "go-${VERSION_NEW}.ebuild" popd >/dev/null || exit function enter() ( cd ../../..; exec cork enter -- $@ ) @@ -24,7 +24,7 @@ enter ebuild "/mnt/host/source/src/third_party/coreos-overlay/dev-lang/go/go-${V # We can only create the actual commit in the actual source directory, not under the SDK. # So create a format-patch, and apply to the actual source. git add dev-lang/go/go-${VERSION_NEW}* metadata -git commit -a -m "dev-lang/go: Upgrade Go ${versionOld} to ${VERSION_NEW}" +git commit -a -m "dev-lang/go: Upgrade Go ${VERSION_OLD} to ${VERSION_NEW}" # Generate metadata after the main commit was done. enter /mnt/host/source/src/scripts/update_metadata --commit coreos @@ -40,4 +40,4 @@ git fetch origin git checkout -B "${BASE_BRANCH}" "origin/${BASE_BRANCH}" git am ~/flatcar-sdk/src/third_party/coreos-overlay/0*.patch -echo ::set-output name=VERSION_OLD::"${versionOld}" +echo ::set-output name=VERSION_OLD::"${VERSION_OLD}"