X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/3adcfba70e98d8248f36c69c9c54fa6c11c8683a..ed637e66d7f4af4b8f81fc897f89a0775cb957f6:/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