]> git.saurik.com Git - cydia.git/blob - version.sh
Automatically attach cydia.log and `dpkg -l`.
[cydia.git] / version.sh
1 #!/bin/bash
2
3 if [[ $# -eq 0 ]]; then
4 flags=(--dirty="+")
5 else
6 flags=("$@")
7 fi
8
9 version=$(git describe --tags --match="v*" "${flags[@]}" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@')
10
11 if grep '#define ForRelease 0' MobileCydia.mm &>/dev/null; then
12 version=${version}~srk
13 fi
14
15 echo "${version}"