Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] how to find ppsspp git revision number on git server?
#1
I'm building RPM for fedora, I want to get the git version like v.0.9.5-XXXXXXX , when a commit happens and we do git fetch

When we compile ppsspp, we can see git-version.cpp, but how do I know the latest full revision number?

thanks.
Reply
#2
This annoys me too. I generally just go to buildbot, find the version and click the link.

Alternatively if you have the hash (the part after 'g'), you can go here:

https://github.com/hrydgard/ppsspp/commits/*hash*

where you replace *hash* with the XXXXXXX (excluding the g)
Reply
#3
I think we need to successfully compile then get the GIT VERSION from

ppsspp/git-version.cpp
Code:
cat ../ppsspp/git-version.cpp|grep \"|cut -f2 -d \"
will get us
v0.9.5-556-gcd6de79
Reply
#4
it's just "git describe --always" at least that's what's used to generate the git-version.cpp
Reply
#5
Henrik: open your .gitconfig file or etc. and add this under [alias]:

find-commit = "!START_POINT="`echo "$1" | sed -e 's/-.*$//'`"; git describe --always `git rev-list "$START_POINT"..master` | grep "$1-" && true"

Use e.g. "git find-commit v0.9.5-3". But it's still a pain and can be slow or ambiguous.

Another useful one:
get-merge = "!git log --ancestry-path $1..master --oneline --merges | tail -n1 && true"

Use e.g. "git get-merge c2b2b36" which will tell you it's pull #4417.

As for packaging, yes, just use git describe --always. I believe it has to be done from within the git directory.

-[Unknown]
Reply
#6
Thanks unknown and Bigpet! that helped a lot for making rpm.
Reply


Forum Jump: