[OS-BUILD PATCHv2 12/17] redhat/scripts/new_release.sh: Use Makefile variables

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

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/scripts/new_release.sh: Use Makefile variables

Use Makefile variables in new_release.sh.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -607,7 +607,7 @@ dist-release-changed: setup-source
 		echo "Nothing changed, skipping updates"; \
 	else \
 		$(GIT) checkout -- $(REDHAT)/$(SPECCHANGELOG); \
-		$(REDHAT)/scripts/new_release.sh $(REDHAT) $(YSTREAM_FLAG) $(ZSTREAM_FLAG) $(BUMP_RELEASE); \
+		$(REDHAT)/scripts/new_release.sh; \
 		$(MAKE) dist-release-finish; \
 	fi
 
diff --git a/redhat/scripts/new_release.sh b/redhat/scripts/new_release.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/new_release.sh
+++ b/redhat/scripts/new_release.sh
@@ -1,20 +1,10 @@
 #!/bin/bash
-if [[ -z $1 || -z $2 ]]; then
-	echo "$(basename "$0") <redhat path> <zstream? no/yes/branch>" >&2;
-	exit 1;
-fi
-
-RHPATH="$1";
-YSTREAM_FLAG="$2";
-ZSTREAM_FLAG="$3";
-BUMP_RELEASE="$4";
-
-if [ -s "$RHPATH/linux-kernel-test.patch" ]; then
+if [ -s "$REDHAT/linux-kernel-test.patch" ]; then
 	echo "linux-kernel-test.patch is not empty, aborting" >&2;
 	exit 1;
 fi
 
-RELEASE=$(sed -n -e 's/^RHEL_RELEASE\ =\ \(.*\)/\1/p' "$RHPATH"/../Makefile.rhelver)
+RELEASE=$(sed -n -e 's/^RHEL_RELEASE\ =\ \(.*\)/\1/p' "$REDHAT"/../Makefile.rhelver)
 
 YVER=$(echo "$RELEASE" | cut -d "." -f 1)
 YVER=${YVER:="$RELEASE"}
@@ -29,15 +19,15 @@ elif [ "$ZSTREAM_FLAG" == "no" ]; then
 	if [ "$YSTREAM_FLAG" == "yes" ]; then
 		NEW_RELEASE="$((RELEASE + 1))";
 	else
-		EARLY_YBUILD=$(sed -n -e 's/^EARLY_YBUILD:=\(.*\)/\1/p' "$RHPATH"/../Makefile.rhelver);
-		EARLY_YRELEASE=$(sed -n -e 's/^EARLY_YRELEASE:=\(.*\)/\1/p' "$RHPATH"/../Makefile.rhelver);
+		EARLY_YBUILD=$(sed -n -e 's/^EARLY_YBUILD:=\(.*\)/\1/p' "$REDHAT"/../Makefile.rhelver);
+		EARLY_YRELEASE=$(sed -n -e 's/^EARLY_YRELEASE:=\(.*\)/\1/p' "$REDHAT"/../Makefile.rhelver);
 		if [ "$EARLY_YBUILD" != "$RELEASE" ]; then
 			NEW_EARLY_YRELEASE=1;
 		else
 			NEW_EARLY_YRELEASE="$((EARLY_YRELEASE + 1))";
 		fi
-		sed -i -e "s/^EARLY_YBUILD:=$EARLY_YBUILD/EARLY_YBUILD:=$RELEASE/" "$RHPATH"/../Makefile.rhelver;
-		sed -i -e "s/^EARLY_YRELEASE:=$EARLY_YRELEASE/EARLY_YRELEASE:=$NEW_EARLY_YRELEASE/" "$RHPATH"/../Makefile.rhelver;
+		sed -i -e "s/^EARLY_YBUILD:=$EARLY_YBUILD/EARLY_YBUILD:=$RELEASE/" "$REDHAT"/../Makefile.rhelver;
+		sed -i -e "s/^EARLY_YRELEASE:=$EARLY_YRELEASE/EARLY_YRELEASE:=$NEW_EARLY_YRELEASE/" "$REDHAT"/../Makefile.rhelver;
 		NEW_RELEASE=$RELEASE;
 	fi
 elif [ "$ZSTREAM_FLAG" == "yes" ]; then
@@ -49,5 +39,5 @@ else
 	exit 1;
 fi
 
-sed -i -e "s/RHEL_RELEASE\ =.*/RHEL_RELEASE\ =\ $NEW_RELEASE/" "$RHPATH"/../Makefile.rhelver;
+sed -i -e "s/RHEL_RELEASE\ =.*/RHEL_RELEASE\ =\ $NEW_RELEASE/" "$REDHAT"/../Makefile.rhelver;
 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1757
_______________________________________________
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 on the list, report it: https://pagure.io/fedora-infrastructure




[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