Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
raphael: Update Local version
Browse files Browse the repository at this point in the history
Signed-off-by: penglezos <[email protected]>
  • Loading branch information
penglezos committed Feb 12, 2023
1 parent c7f8b3a commit f5645e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ config LOCALVERSION_AUTO

which is done within the script "scripts/setlocalversion".)

config LOCALVERSION_COMMIT_SHA
bool "Leave only commit sha"
default y
depends on LOCALVERSION_AUTO
depends on !COMPILE_TEST
help
A cleaner version of LOCALVERSION_AUTO, contains
commit sha of HEAD.

config HAVE_KERNEL_GZIP
bool

Expand Down
7 changes: 7 additions & 0 deletions scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ scm_version()
if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
head=`git rev-parse --verify --short HEAD 2>/dev/null`; then

# get commit sha and leave.
if test "$CONFIG_LOCALVERSION_COMMIT_SHA" = "y"; then
last_commit=$(git rev-parse --verify --short=10 HEAD)
printf '%s' "-$last_commit"
return
fi

# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
# it, because this version is defined in the top level Makefile.
if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
Expand Down

0 comments on commit f5645e7

Please sign in to comment.