From 1e22686cfe0b18ba3e5d11fe864d4057a7b3a377 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 30 Oct 2021 11:21:43 +0200 Subject: [PATCH] deb: building with a git repo --- tools/install/create_lazarus_deb.sh | 5 +++-- tools/install/create_lazarus_export_tgz.sh | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tools/install/create_lazarus_deb.sh b/tools/install/create_lazarus_deb.sh index f05a83a038..b976f7b1c4 100755 --- a/tools/install/create_lazarus_deb.sh +++ b/tools/install/create_lazarus_deb.sh @@ -75,7 +75,7 @@ while [ $# -gt 0 ]; do *) echo "invalid parameter $1" - echo "Usage: ./create_lazarus_deb.sh [chmhelp] [gtk1] [qt] [qtlib=] [release=svn] " + echo "Usage: ./create_lazarus_deb.sh [chmhelp] [gtk1] [qt] [qtlib=] [release=YourPostfix] " exit 1 ;; esac @@ -137,7 +137,7 @@ echo "LazVersion=$LazVersion" echo "FPCVersion=$FPCVersion" echo "ChangeLogDate=$ChangeLogDate" -# download/export lazarus svn if needed +# download/export lazarus git if needed if [ ! -f $SrcTGZ ]; then ./create_lazarus_export_tgz.sh $SrcTGZ fi @@ -204,6 +204,7 @@ strip lazbuild strip tools/lazres strip tools/updatepofiles strip tools/lrstolfm +# Note: svn2revisioninc supports git too strip tools/svn2revisioninc if [ -f components/chmhelp/lhelp/lhelp ]; then strip components/chmhelp/lhelp/lhelp diff --git a/tools/install/create_lazarus_export_tgz.sh b/tools/install/create_lazarus_export_tgz.sh index 55c395736f..32627398e7 100755 --- a/tools/install/create_lazarus_export_tgz.sh +++ b/tools/install/create_lazarus_export_tgz.sh @@ -68,22 +68,26 @@ TmpLazDir=$TmpDir/lazarus mkdir -p $TmpDir rm -rf $TmpLazDir if [ "x$Download" = "xyes" ]; then - echo "downloading lazarus svn ..." + echo "downloading lazarus git ..." mkdir -p $TmpLazDir Revision=Exported cd $TmpDir - svn export http://svn.freepascal.org/svn/lazarus/trunk $TmpLazDir -# git clone --depth=1 https://gitlab.com/freepascal.org/lazarus/lazarus.git $TmpLazDir -# rm -rf $TmpLazDir/.git + # old-svn: svn export http://svn.freepascal.org/svn/lazarus/trunk $TmpLazDir + git clone --depth=1 https://gitlab.com/freepascal.org/lazarus/lazarus.git $TmpLazDir + rm -rf $TmpLazDir/.git cd - else - echo "extracting lazarus from local svn ..." + echo "extracting lazarus from local git ..." LazSrcDir=$(pwd | sed -e 's#/tools/install.*$##') - #Revision=$(svnversion $LazSrcDir) - comment this out as svn no longer works + # old-svn: Revision=$(svnversion $LazSrcDir) - comment this out as svn no longer works Revision=$(git -C $LazSrcDir describe --always --first-parent) cd $TmpDir -# cp -a $LazSrcDir $TmpLazDir #can't use svn export anymore - git -C $LazSrcDir --work-tree=$TmpLazDir restore . + # old-svn: cp -a $LazSrcDir $TmpLazDir + mkdir $TmpLazDir + cp -a $LazSrcDir/.git $TmpLazDir/ + git -C $TmpLazDir restore . + rm -rf $TmpLazDir/.git + #git -C $LazSrcDir --work-tree=$TmpLazDir restore . cd - if [ "$UseCHMHelp" = "1" ]; then echo