Browse Source

Replaced scripts so that they use git instead of svn.

Jan Habermann 16 years ago
parent
commit
0b1e76e1ad
3 changed files with 18 additions and 16 deletions
  1. 9 8
      scripts/release.sh
  2. 7 6
      scripts/static-build.sh
  3. 2 2
      scripts/test.sh

+ 9 - 8
scripts/release.sh

@@ -1,7 +1,8 @@
 #!/bin/bash
-svn status
+
+#git status
 if [[ $1 == "" ]] || [[ $2 == "" ]] || [[ $3 == "" ]]; then
-	echo "Bad vertion"
+	echo "Bad version"
 	exit 1
 fi
 v="$1.$2.$3"
@@ -14,19 +15,19 @@ sed -ri "s/SET\(CPACK_PACKAGE_VERSION_MINOR \"[0-9]+\"\)/SET(CPACK_PACKAGE_VERSI
 sed -ri "s/SET\(CPACK_PACKAGE_VERSION_PATCH \"[0-9]+\"\)/SET(CPACK_PACKAGE_VERSION_PATCH \"$3\")/" CMakeLists.txt
 sed -ri "s/MAJOR_VERSION=[0-9]+ MINOR_VERSION=[0-9]+ PATCH_VERSION=[0-9]+/MAJOR_VERSION=$1 MINOR_VERSION=$2 PATCH_VERSION=$3/" wkhtmltopdf.pro
 
-./static-build.sh linux || (echo Build failed; exit 1)
-if ! ./test.sh; then
+./scripts/static-build.sh linux || (echo Build failed; exit 1)
+if ! ./scripts/test.sh; then
 	echo "Test failed"
 	exit 1
 fi
-./static-build.sh win || (echo Build failed; exit 1)
+./scripts/static-build.sh win || (echo Build failed; exit 1)
 
-svn ci -m "Making ready for vertion $v" CMakeLists.txt wkhtmltopdf.pro
-svn cp https://wkhtmltopdf.googlecode.com/svn/trunk https://wkhtmltopdf.googlecode.com/svn/tags/$v -m "Tagged $v"
+git commit -m "Making ready for version $v" CMakeLists.txt wkhtmltopdf.pro
+git tag "$v"
 
 rm -rf release-$v
 mkdir release-$v
-svn export . release-$v/wkhtmltopdf-$v
+git checkout-index --prefix=./release-$v/wkhtmltopdf-$v/ -a
 tar -cjvf release-$v/wkhtmltopdf-$v.tar.bz2 -C release-$v wkhtmltopdf-$v
 cp wkhtmltopdf.exe release-$v/wkhtmltopdf-$v.exe
 tar -cjvf release-$v/wkhtmltopdf-$v-static.tar.bz2 wkhtmltopdf

+ 7 - 6
scripts/static-build.sh

@@ -14,10 +14,11 @@
 # You should have received a copy of the GNU General Public License
 # along with wkhtmltopdf.  If not, see <http:#www.gnu.org/licenses/>.
 
-# This script will compile static vertions of wkhtmltopdf for linux and for windows (it must run in linux)
+# This script will compile static versions of wkhtmltopdf for linux and for windows (it must run in linux)
 # It requires build-essential and wine to run. Please note that it will take quite a while
 
 #Configuration for the static build
+
 QT=qt-all-opensource-src-4.5.1
 MIRROR=kent
 MINGWFILES="binutils-2.19.1-mingw32-bin.tar.gz mingw32-make-3.81-20080326-3.tar.gz \
@@ -42,17 +43,17 @@ function applypatch() {
 BUILD=/tmp/build
 #Create static build directory
 mkdir -p $BUILD
-cat qt-*.patch > $BUILD/qt.patch
+cat ./src/qt-patches/qt-*.patch > $BUILD/qt.patch
 cat static_qt_conf_base static_qt_conf_win | sed -re 's/#.*//' | sed -re '/^[ \t]*$/d' | sort -u > $BUILD/conf_win
 cat static_qt_conf_base static_qt_conf_linux | sed -re 's/#.*//' | sed -re '/^[ \t]*$/d' | sort -u > $BUILD/conf_linux
 
 BASE=${PWD}
 
 cd ${BUILD}
-#Fetch most the vertion of qt
+#Fetch most recent version of qt
 get http://download.qtsoftware.com/qt/source/${QT}.tar.bz2 $QT.tar.bz2 || exit 1
 
-#Fetch an unpack upx
+#Fetch and unpack upx
 get http://upx.sourceforge.net/download/${UPX}.tar.bz2 ${UPX}.tar.bz2 || exit 1
 unpack ${UPX}.tar.bz2 || exit 1
 
@@ -74,7 +75,7 @@ if [[ "$1" == "all" ]] || [[ "$1" == "linux" ]]; then
 	fi
 	cd ..
 	rm -rf wkhtmltopdf
-	svn export ${BASE} wkhtmltopdf --force || exit 1
+	git checkout-index --prefix=./wkhtmltopdf/ -a -f || exit 1
 	cd wkhtmltopdf
 	../qt/bin/qmake || exit 1
 	make -j5 || exit 1
@@ -130,7 +131,7 @@ EOF
 	fi
 	cd ..
 	rm -rf wkhtmltopdf
-	svn export ${BASE} wkhtmltopdf --force || exit 1
+	git checkout-index --prefix=./wkhtmltopdf/ -a -f || exit 1
 	cd wkhtmltopdf
 	wine ../qt/bin/qmake.exe wkhtmltopdf.pro -o Makefile -spec win32-g++ || exit 1
 	wine mingw32-make -j5 || exit 1

+ 2 - 2
scripts/test.sh

@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with wkhtmltopdf.  If not, see <http:#www.gnu.org/licenses/>.
 
-#This script will the a compiled wkhtmltopdf for some basic functionality
+#This script will test a compiled wkhtmltopdf for some basic functionality
 
 #This is just some random image
 img=http://upload.wikimedia.org/wikipedia/en/thumb/0/0e/TS3_logo_4.JPG/200px-TS3_logo_4.JPG
@@ -112,7 +112,7 @@ function testOutline() {
 
 function testBuild() {
 	rm -rf wkhtmltopdf
-	svn export -q .. wkhtmltopdf || (bad "Build $1 (1)" && return 1)
+	git checkout-index --prefix=./wkhtmltopdf/ -a || (bad "Build $1 (1)" && return 1)
 	cd wkhtmltopdf
 	if [[ "$1" == "qmake" ]]; then
 		qmake 2>/dev/null >/dev/null || (bad "Build $1 (2)" && return 1)