Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
get the version from separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
ashkulz committed Feb 5, 2014
1 parent a82ac85 commit feae358
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 20 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.12.0
9 changes: 3 additions & 6 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ if [ ! -f \$DST/qt/bin/qmake ]; then
fi
cd \$BLD/app
cp \$BLD/qt/.qmake.cache .
\$DST/qt/bin/qmake \$SRC/wkhtmltopdf.pro
GIT_DIR=\$SRC/.git make -j${J} -q || exit 1
GIT_DIR=\$SRC/.git \$DST/qt/bin/qmake \$SRC/wkhtmltopdf.pro
make -j${J} || exit 1
strip bin/wkhtmltopdf bin/wkhtmltoimage
rm -fR \$DST/wkhtmltox
mkdir -p \$DST/wkhtmltox \$DST/wkhtmltox/bin \$DST/wkhtmltox/lib \$DST/wkhtmltox/include/wkhtmltox
Expand All @@ -102,10 +102,7 @@ EOF

function package_build() {
cd ${BUILD}
head -3 ${BASE}/version.pri > version.sh
. ${BUILD}/version.sh
rm -f . ${BUILD}/version.sh
RELEASE_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-`git --git-dir=$BASE/.git rev-parse --short HEAD`
RELEASE_VERSION=`cat $BASE/VERSION`-`git --git-dir=$BASE/.git rev-parse --short HEAD`
cd ${BUILD}/linux-$1/dist
tar -c -v --xz -f ${BUILD}/wkhtmltox-linux-$1_${RELEASE_VERSION}.tar.xz wkhtmltox/
}
Expand Down
6 changes: 1 addition & 5 deletions build_msvc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,11 @@ copy %~dp0include\wkhtmltox\dllend.inc dist\include\wkhtmltox
copy %~dp0include\wkhtmltox\pdf.h dist\include\wkhtmltox
copy %~dp0include\wkhtmltox\image.h dist\include\wkhtmltox

set MAJOR_VERSION=
set MINOR_VERSION=
set PATCH_VERSION=
set WK_VERSION=
set WK_HASH=

cd /d %~dp0
FOR /F %%v IN (version.pri) DO SET %%v
set WK_VERSION=%MAJOR_VERSION%.%MINOR_VERSION%.%PATCH_VERSION%
FOR /F "delims=" %%v IN ('type VERSION') DO set WK_VERSION=%%v
FOR /F "delims=" %%h IN ('git rev-parse --short HEAD') DO set WK_HASH=%%h

if exist "%ProgramFiles%\NSIS\makensis.exe" goto build_installer
Expand Down
10 changes: 10 additions & 0 deletions common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ win32 {
}

QT += webkit network svg

# version related information
VERSION_TEXT=$$cat($$PWD/VERSION)
FULL_VERSION=$$split(VERSION_TEXT, ".")
MAJOR_VERSION=$$member(FULL_VERSION, 0)
MINOR_VERSION=$$member(FULL_VERSION, 1)
PATCH_VERSION=$$member(FULL_VERSION, 2)
BUILD=$$system(git rev-parse HEAD)

DEFINES += MAJOR_VERSION=$$MAJOR_VERSION MINOR_VERSION=$$MINOR_VERSION PATCH_VERSION=$$PATCH_VERSION BUILD=$$BUILD
1 change: 0 additions & 1 deletion src/image/image.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with wkhtmltopdf. If not, see <http:#www.gnu.org/licenses/>.

include(../../version.pri)
include(../../common.pri)

TEMPLATE = app
Expand Down
1 change: 0 additions & 1 deletion src/lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
TEMPLATE = lib
CONFIG += dll

include(../../version.pri)
include(../../common.pri)
include(lib.pri)

Expand Down
1 change: 0 additions & 1 deletion src/pdf/pdf.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with wkhtmltopdf. If not, see <http:#www.gnu.org/licenses/>.

include(../../version.pri)
include(../../common.pri)

TEMPLATE = app
Expand Down
6 changes: 0 additions & 6 deletions version.pri

This file was deleted.

0 comments on commit feae358

Please sign in to comment.