4 versionSrc
="src/base/version.h.in"
5 versionMajor
="$(grep -Po '(?<=QBT_VERSION_MAJOR )\d+' "$versionSrc")"
6 versionMinor
="$(grep -Po '(?<=QBT_VERSION_MINOR )\d+' "$versionSrc")"
7 versionBugfix
="$(grep -Po '(?<=QBT_VERSION_BUGFIX )\d+' "$versionSrc")"
8 versionBuild
="$(grep -Po '(?<=QBT_VERSION_BUILD )\d+' "$versionSrc")"
9 versionStatus
="$(grep -Po '(?<=QBT_VERSION_STATUS ")\w
+' "$versionSrc")"
11 if [ "$versionBuild" != "0" ]; then
12 projectVersion="$versionMajor.$versionMinor.$versionBugfix.$versionBuild$versionStatus"
14 projectVersion="$versionMajor.$versionMinor.$versionBugfix$versionStatus"
18 git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | gzip -9 > "qbittorrent-$projectVersion.tar.gz"
19 git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | xz -9 > "qbittorrent-$projectVersion.tar.xz"