.github: rename versionOld to VERSION_OLD

To make go-apply-patch.sh work with the new helpers,
we need to remove `versionOld` to `VERSION_OLD`.
This commit is contained in:
Dongsu Park 2020-04-09 13:47:46 +02:00 committed by Kai Lüke
parent e45323dc37
commit a292bdd1be

View File

@ -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 pushd ~/flatcar-sdk/src/third_party/coreos-overlay >/dev/null || exit
git checkout -B "${branch}" "github/${BASE_BRANCH}" 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_OLD=$(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_NEW}" = "${VERSION_OLD}" ]] && echo "already the latest Go, nothing to do" && exit
pushd "dev-lang/go" >/dev/null || 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 popd >/dev/null || exit
function enter() ( cd ../../..; exec cork enter -- $@ ) 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. # 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. # So create a format-patch, and apply to the actual source.
git add dev-lang/go/go-${VERSION_NEW}* metadata 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. # Generate metadata after the main commit was done.
enter /mnt/host/source/src/scripts/update_metadata --commit coreos 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 checkout -B "${BASE_BRANCH}" "origin/${BASE_BRANCH}"
git am ~/flatcar-sdk/src/third_party/coreos-overlay/0*.patch 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}"