How do I get Git's latest stable release version number?
Posted
by MattDiPasquale
on Stack Overflow
See other posts from Stack Overflow
or by MattDiPasquale
Published on 2010-05-30T23:53:44Z
Indexed on
2010/05/31
0:02 UTC
Read the original article
Hit count: 295
I'm writing a git-install.sh script: http://gist.github.com/419201
To get Git's latest stable release version number, I do:
LSR_NUM=$(curl -silent http://git-scm.com/ | sed -n '/id="ver"/ s/.*v\([0-9].*\)<.*/\1/p')
2 Questions:
Refactor my code: Is there a better way programmatically to do this?
This works now, but it's brittle: if the web page at http://git-scm.com/ changes, the line above may stop working.
PHP has a reliable URL for getting the latest release version: http://stackoverflow.com/questions/288206/is-there-a-site-which-simply-outputs-the-latest-stable-version-numbers-of-php-and
Is there something like this for Git? This comes close: http://www.kernel.org/pub/software/scm/git/
© Stack Overflow or respective owner