Mike Tzou
4 years ago
committed by
GitHub
5 changed files with 39 additions and 61 deletions
@ -0,0 +1,19 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
# get version numbers |
||||||
|
versionSrc="src/base/version.h.in" |
||||||
|
versionMajor="$(grep -Po '(?<=QBT_VERSION_MAJOR )\d+' "$versionSrc")" |
||||||
|
versionMinor="$(grep -Po '(?<=QBT_VERSION_MINOR )\d+' "$versionSrc")" |
||||||
|
versionBugfix="$(grep -Po '(?<=QBT_VERSION_BUGFIX )\d+' "$versionSrc")" |
||||||
|
versionBuild="$(grep -Po '(?<=QBT_VERSION_BUILD )\d+' "$versionSrc")" |
||||||
|
versionStatus="$(grep -Po '(?<=QBT_VERSION_STATUS ")\w+' "$versionSrc")" |
||||||
|
|
||||||
|
if [ "$versionBuild" != "0" ]; then |
||||||
|
projectVersion="$versionMajor.$versionMinor.$versionBugfix.$versionBuild$versionStatus" |
||||||
|
else |
||||||
|
projectVersion="$versionMajor.$versionMinor.$versionBugfix$versionStatus" |
||||||
|
fi |
||||||
|
|
||||||
|
# pack archives |
||||||
|
git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | gzip -9 > "qbittorrent-$projectVersion.tar.gz" |
||||||
|
git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | xz -9 > "qbittorrent-$projectVersion.tar.xz" |
@ -1,27 +1,3 @@ |
|||||||
# keep it all lowercase to match program naming convention on *nix systems |
|
||||||
PROJECT_NAME = qbittorrent |
|
||||||
|
|
||||||
# Define version numbers here |
|
||||||
VER_MAJOR = 4 |
|
||||||
VER_MINOR = 4 |
|
||||||
VER_BUGFIX = 0 |
|
||||||
VER_BUILD = 0 |
|
||||||
VER_STATUS = alpha1 # Should be empty for stable releases! |
|
||||||
|
|
||||||
# Don't touch the rest part |
|
||||||
PROJECT_VERSION = $${VER_MAJOR}.$${VER_MINOR}.$${VER_BUGFIX} |
|
||||||
|
|
||||||
!equals(VER_BUILD, 0) { |
|
||||||
PROJECT_VERSION = $${PROJECT_VERSION}.$${VER_BUILD} |
|
||||||
} |
|
||||||
|
|
||||||
PROJECT_VERSION = $${PROJECT_VERSION}$${VER_STATUS} |
|
||||||
|
|
||||||
# Generate version header |
# Generate version header |
||||||
versionHeader = $$cat(src/base/version.h.in, blob) |
versionHeader = $$cat(src/base/version.h.in, blob) |
||||||
versionHeader = $$replace(versionHeader, "@VER_MAJOR@", $$VER_MAJOR) |
|
||||||
versionHeader = $$replace(versionHeader, "@VER_MINOR@", $$VER_MINOR) |
|
||||||
versionHeader = $$replace(versionHeader, "@VER_BUGFIX@", $$VER_BUGFIX) |
|
||||||
versionHeader = $$replace(versionHeader, "@VER_BUILD@", $$VER_BUILD) |
|
||||||
versionHeader = $$replace(versionHeader, "@PROJECT_VERSION@", $$PROJECT_VERSION) |
|
||||||
write_file(src/base/version.h, versionHeader) |
write_file(src/base/version.h, versionHeader) |
||||||
|
Loading…
Reference in new issue