소스 검색

scripts/getver.sh: append short git hash based on upstream commit

The short git hash suffix printed by getver.sh is taken from the
latest local commit, change this to use the hash from latest
upstream commit if available. This is considered the intended
behavior based on commit message a642a11faca87e2a7bddc1fadb54253e2fc26e84,
introducing getver.sh.

Signed-off-by: Magnus Kroken <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Magnus Kroken 8 년 전
부모
커밋
289f2a8ce3
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      scripts/getver.sh

+ 2 - 1
scripts/getver.sh

@@ -40,7 +40,8 @@ try_git() {
 			REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
 		fi
 
-		REV="${REV:+r$REV-$(git log --format="%h" -1)}"
+		REV="${REV:+r$REV-$(git log -n 1 --format="%h" $UPSTREAM_BASE)}"
+
 		;;
 	esac