[OS-BUILD PATCHv3 5/10] CI: Remove legacy tag check cruft

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Don Zickus <dzickus@xxxxxxxxxx>

CI: Remove legacy tag check cruft

Originally code was added to handle the script being repeatedly called
by detecting an existing tag and aborting to prevent a mess.

Over the years we removed the ark-patches, did more git merges and
strengthened dist-release.  This simplified the code paths and remove a
lot of fragile cases.

The original checks are unnecessary now that 'make dist-release' blocks
any changes from going in.  'make dist-release-tag' will also fail on
existing tags.

Remove the complicated check and rely on existing mechanisms.

In addition, ark-patches and its release structure died a couple of
years ago, remove that cruft too.  Instead just do the detached head for
ark-latest.

Also removed hardcoded 'os-build' and replaced with a variable in prep
for other branches to use this script (like rt and automotive).

Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>

diff --git a/redhat/scripts/ci/ark-create-release.sh b/redhat/scripts/ci/ark-create-release.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/ci/ark-create-release.sh
+++ b/redhat/scripts/ci/ark-create-release.sh
@@ -11,40 +11,13 @@ set -e
 # shellcheck source=./redhat/scripts/ci/ark-ci-env.sh
 . "$(dirname "$0")"/ark-ci-env.sh
 
-# Detect if there's one or more prior releases for this upstream ref.
-if git describe "$UPSTREAM_REF" | grep -q -c '\-g'; then
-	SHORT_COMMIT=$(git describe "$UPSTREAM_REF" | cut -d "g" -f 2)
-	BASE_RELEASE=$(git tag -l | grep "$SHORT_COMMIT" | tail -n 1)
-else
-	if git describe "$UPSTREAM_REF" | grep -q -c "\-"; then
-		RC_LEVEL="0.$(git describe "$UPSTREAM_REF" | cut -d "-" -f 2)"
-		VERSION=$(git describe "$UPSTREAM_REF" | cut -d "-" -f 1 | cut -c 2-)
-	else
-		RC_LEVEL=""
-		VERSION=$(git describe "$UPSTREAM_REF" | cut -c 2-)
-	fi
-	BASE_RELEASE=$(git tag -l | grep -E "kernel-$VERSION\.0-$RC_LEVEL\.[0-9]+" | tail -n 1)
-fi
-if [ -n "$BASE_RELEASE" ]; then
-	printf "There's already a release for %s (tagged as %s); if you're trying \
-		to create a new release check out that tag, apply any commits you \
-		want, and then run \"touch localversion && make dist-release && make \
-		dist-release-tag\".\n" "$UPSTREAM_REF" "$BASE_RELEASE"
-	exit 3
-fi
-
-git checkout os-build
+git checkout "${BRANCH}"
 touch localversion
 make dist-release
 
-if git tag -v "$UPSTREAM_REF" > /dev/null 2>&1; then
-	git checkout -b ark/"$UPSTREAM_REF" ark/patches/"$UPSTREAM_REF"
-	RELEASE_BRANCHES=" ark/$UPSTREAM_REF ark/patches/$UPSTREAM_REF"
-else
-	# This is a snapshot release so we're only going to make a tag
-	git checkout --detach os-build && git describe
-	RELEASE_BRANCHES=""
-fi
+# prep ark-latest branch
+git checkout --detach "${BRANCH}" && git describe
+
 MR_PATCHES=$(gitlab project-merge-request list --project-id="$PROJECT_ID" \
 	--labels="Include in Releases" --state=opened | grep -v "^$" | sort | \
 	awk '{ print "https://gitlab.com/cki-project/kernel-ark/-/merge_requests/"; $2 ".patch" }')

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2519
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux