[openwrt/openwrt] scripts: fix revision calculation using new "main" branch
LEDE Commits
lede-commits at lists.infradead.org
Tue May 21 11:43:24 PDT 2024
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8
commit 9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8
Author: Marius Dinu <m95d+git at psihoexpert.ro>
AuthorDate: Tue May 21 18:08:33 2024 +0300
scripts: fix revision calculation using new "main" branch
Fix revision calculation when local branch is rebased on new "main" branch
instead of "master".
Signed-off-by: Marius Dinu <m95d+git at psihoexpert.ro>
Link: https://github.com/openwrt/openwrt/pull/15538
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
scripts/getver.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/getver.sh b/scripts/getver.sh
index 61906040b1..0659d8004a 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -26,7 +26,7 @@ try_git() {
*)
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"
- [ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"
+ [ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name main@{u} 2>/dev/null)"
REV="$(git rev-list ${REBOOT}..$GET_REV 2>/dev/null | wc -l | awk '{print $1}')"
if [ -n "$ORIGIN" ]; then
More information about the lede-commits
mailing list