diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2008-04-01 09:53:14 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2008-04-01 09:53:14 +0000 |
commit | e2f56edbd37cd6036dae8d768054fdeeb3c4bdfe (patch) | |
tree | 35986acf820ef3384e588b1869be096eac09ccad /scripts/setlocalversion | |
parent | 34274164d9be605924bb8466fb7639bace5dee2b (diff) | |
download | buildroot-novena-e2f56edbd37cd6036dae8d768054fdeeb3c4bdfe.tar.gz buildroot-novena-e2f56edbd37cd6036dae8d768054fdeeb3c4bdfe.zip |
setlocalversion: add git-svn support
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-x | scripts/setlocalversion | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 1c1bdaf73..e9de7fa0a 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -12,7 +12,12 @@ cd "${1:-.}" || usage if head=`git rev-parse --verify HEAD 2>/dev/null`; then # Do we have an untagged version? if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then - git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + git describe 2>/dev/null | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + fi + + # Is this git on svn? + if git config --get svn-remote.svn.url >/dev/null; then + printf -- '-svn%s' "`git-svn find-rev $head`" fi # Are there uncommitted changes? |