X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/9b3dc53f05783db3b43b85063b9f8b34e288a730..92c79e8d525db2e8a768790e1256ac0f6ab80c1e:/version.sh diff --git a/version.sh b/version.sh index 2508390b..7fcf1515 100755 --- a/version.sh +++ b/version.sh @@ -1,5 +1,11 @@ #!/bin/bash -ver=$(git describe --tags --dirty="+") -ver=${ver#v} -ver=${ver//-/.} -echo "${ver}" + +if [[ $# -eq 0 ]]; then + flags=(--dirty="+") +else + flags=("$@") +fi + +echo -n "$(git describe --tags --match="v*" "${flags[@]}" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@')" +grep '#define ForRelease 0' MobileCydia.mm &>/dev/null && echo -n '~srk' +echo