Skip to content

Commit 5fd3e44

Browse files
committed
[build.sh] getting branch-name from last commit (to fix detached head on checkout tag)
1 parent f79c080 commit 5fd3e44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ done
3434
if [ ${PACKAGE_Error} == 1 ]; then exit 1; fi
3535

3636
kernver=$(make kernelversion)
37-
kernbranch=$(git rev-parse --abbrev-ref HEAD)
38-
gitbranch=$(git rev-parse --abbrev-ref HEAD|sed 's/^4\.[0-9]\+-//')
37+
#kernbranch=$(git rev-parse --abbrev-ref HEAD)
38+
kernbranch=$(git branch --contains $(git log -n 1 --pretty='%h') | grep -v '(HEAD' | head -1 | sed 's/^..//')
39+
gitbranch=$(echo $kernbranch|sed 's/^4\.[0-9]\+-//')
3940

4041
function increase_kernel {
4142
#echo $kernver

0 commit comments

Comments
 (0)