From acf9c1796972615ecb27db36455383aafbc59071 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sat, 7 Nov 2020 18:38:35 +0100 Subject: [PATCH 1/5] Add packaging script's info of packaging_script Debian, Ubuntu, Windows https://qelectrotech.org/wiki_new/doc/packaging_debian#packaging_script_debian_ubuntu_windows Laurent, can you check the scripts if they work now, I'll then change them to scripts that can handle git Submodules --- packaging_script_AppImage.sh | 51 +++ packaging_script_Debian_Ubuntu_Windows.sh | 498 ++++++++++++++++++++++ packaging_script_Flatpak.sh | 37 ++ 3 files changed, 586 insertions(+) create mode 100755 packaging_script_AppImage.sh create mode 100755 packaging_script_Debian_Ubuntu_Windows.sh create mode 100755 packaging_script_Flatpak.sh diff --git a/packaging_script_AppImage.sh b/packaging_script_AppImage.sh new file mode 100755 index 000000000..070e0b155 --- /dev/null +++ b/packaging_script_AppImage.sh @@ -0,0 +1,51 @@ +#!/bin/bash +#set -x + +#delete old qet.h +rm sources/qet.h + +cd sources +git reset --hard origin/master + +cd .. +git pull +sed -i 's/DEFINES += QET_EXPORT_PROJECT_DB/#DEFINES += QET_EXPORT_PROJECT_DB/' qelectrotech.pro + +GITCOMMIT=$(git rev-parse --short HEAD) +A=$(git rev-list HEAD --count) +HEAD=$(($A+473)) + +VERSION=$(cat sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in GIT sources/qet.h +tagName=$(cat sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in GIT sources/qet.h + +# recupere le numero de la nouvelle revision +#revAp=$(svnversion | cut -d : -f 2 | tr -d '[:alpha:]') + +# On recupere le numero de version de l'originale +tagName=$(sed -n "s/const QString displayedVersion =\(.*\)/\1/p" sources/qet.h | cut -d\" -f2 | cut -d\" -f1 ) + +# On modifie l'originale avec le numéro de révision du dépôt GIT +sed -i 's/'"const QString displayedVersion =.*/const QString displayedVersion = \"$tagName+$GITCOMMIT\";"'/' sources/qet.h + +rm -Rf build/ +mkdir build && cd build + +qmake ../qelectrotech.pro +make -j48 + +cd ../appdir/ +rm qelectrotech/usr/bin/qelectrotech +rm -Rf qelectrotech/usr/{lib,plugins} +rm -Rf qelectrotech/usr/share/{elements,examples,titleblocks,lang,man,doc} + +cp ../build/qelectrotech qelectrotech/usr/bin/ +cp -r ../{elements,examples,titleblocks,lang,man} qelectrotech/usr/share/ + +./linuxdeployqt-continuous-x86_64.AppImage qelectrotech/usr/share/qelectrotech.desktop -appimage -bundle-non-qt-libs -verbose=1 -extra-plugins=iconengines +rm qelectrotech/AppRun +sed -i 's/'"QElectroTech_0.8-DEV.*/QElectroTech_0.8-DEV-r"$HEAD""'/' qelectrotech/qelectrotech.desktop +cp AppRun qelectrotech/ +rm QElectroTech_*.AppImage + +ARCH=x86_64 ./appimagetool-x86_64.AppImage qelectrotech +chmod -x QElectroTech_0.8-DEV-r$HEAD-x86_64.AppImage diff --git a/packaging_script_Debian_Ubuntu_Windows.sh b/packaging_script_Debian_Ubuntu_Windows.sh new file mode 100755 index 000000000..5a3ad97d4 --- /dev/null +++ b/packaging_script_Debian_Ubuntu_Windows.sh @@ -0,0 +1,498 @@ +#!/bin/bash +#nettoyage des chroots +#set -x +eval $(gpg-agent --daemon) + +#variables repertoires de travail +DEFAULT_DIR="$HOME/paquet_qet" +TEMP_DIR="$HOME" +SSH_TARGET='scorpio810@ssh.tuxfamily.org:/home/qet/qelectrotech.org-web/htdocs/dl_link.inc.php' +SSH_OPTIONS=-B + +#Find Subversion revision number in 0.60 branch +#if [ -z "$HEAD" ] ; then +#HEAD=$(svn --xml info svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60 | grep revision=\" | tail -1 | cut -d\" -f2) + +#fi + +#VERSION=$(svn cat svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60/sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in Subversion sources/qet.h +#tagName=$(svn cat svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60/sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in Subversion sources/qet.h +cd $DEFAULT_DIR +cd qet_git +git pull +#git checkout test_pugi + +GITCOMMIT=$(git rev-parse --short HEAD) + +#Find Subversion revision number in trunk branch +if [ -z "$HEAD" ] ; then +#HEAD=$(svn --xml info svn://svn.tuxfamily.org/svnroot/qet/qet/trunk | grep revision=\" | tail -1 | cut -d\" -f2) +A=$(git rev-list HEAD --count) +HEAD=$(($A+473)) + # force displayed number +fi + +VERSION=$(cat sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in Subversion sources/qet.h +tagName=$(cat sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in Subversion sources/qet.h +#git ls-remote https://git.tuxfamily.org/qet/qet.git/ | head -1 | cut -c1-10 +#95d1fca171 +#git rev-list HEAD --count +#5475 + + + +#clean /var/cache/pbuilder/ .. / result/debs +echo -e "\033[1;31mWould you like to clean all debs n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + echo -e "\033[1;31mClean_all_base_environment.\033[m" + cd /var/cache/pbuilder/stable-amd64/result/ && sudo rm qe* + cd /var/cache/pbuilder/unstable-amd64/result/ && sudo rm qe* + cd /var/cache/pbuilder/stable-i386/result/ && sudo rm qe* + cd /var/cache/pbuilder/unstable-i386/result/ && sudo rm qe* + else + echo -e "\033[1;33mNo Clean_all_base_environment.\033[m" +fi +#clean all apt cache +echo -e "\033[1;31mWould you like to clean all pbuilder n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + echo -e "\033[1;31mClean_all_pbuilder_environment.\033[m" + DIST=stable ARCH=i386 sudo pbuilder --clean + DIST=stable ARCH=amd64 sudo pbuilder --clean + DIST=unstable ARCH=i386 sudo pbuilder --clean + DIST=unstable ARCH=amd64 sudo pbuilder --clean + else + echo -e "\033[1;33mNo Clean_all_pbuilder_environment.\033[m" +fi + +#Update des chroots +echo -e "\033[1;31mWould you like to update all chroots n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + echo -e "\033[1;33mUpdate_all_base_environment..\033[m" + sudo DIST=stable ARCH=i386 pbuilder update --override-config --configfile /home/laurent/.pbuilderrc + sudo DIST=sid ARCH=i386 pbuilder update --override-config --configfile /home/laurent/.pbuilderrc + sudo DIST=stable pbuilder update --override-config --configfile /home/laurent/.pbuilderrc + sudo DIST=sid pbuilder update --override-config --configfile /home/laurent/.pbuilderrc + else +echo -e "\033[1;33mNo Update_all_base_environment.\033[m" +fi + +echo -e "\033[1;34mdownload source qelectrotech-$VERSION.r$HEAD.\033[m" + +cd $TEMP_DIR + +#get latest source revision +# svn export svn://svn.tuxfamily.org/svnroot/qet/qet/trunk --revision 5212 qelectrotech-$VERSION.r$HEAD/ # force a specific version in trunk +#svn export svn://svn.tuxfamily.org/svnroot/qet/qet/trunk qelectrotech-$VERSION.r$HEAD/ +#svn export svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60 qelectrotech-$VERSION.r$HEAD/ # Branch 0.61 +cp -r $DEFAULT_DIR/qet_git/ $TEMP_DIR/qelectrotech-$VERSION.r$HEAD/ +rm -rf qelectrotech-$VERSION.r$HEAD/.git +#create svn tarball +tar cfvz qelectrotech-$VERSION.r$HEAD.tar.gz qelectrotech-$VERSION.r$HEAD/ + +#copy tarball in $DEFAULT_DIR +cp qelectrotech-$VERSION.r$HEAD.tar.gz $DEFAULT_DIR + +clean $TEMP_DIR +rm -Rf qelectrotech-$VERSION.r$HEAD/ && rm qelectrotech-$VERSION.r$HEAD.tar.gz + +#return to working directory +cd $DEFAULT_DIR + +#extract tarball and go to archive +tar zxvf qelectrotech-$VERSION.r$HEAD.tar.gz && cd qelectrotech-$VERSION.r$HEAD/ + +#create origin.tar.gz +dh_make -e scorpio@qelectrotech.org -c gpl2 -f ../qelectrotech-$VERSION.r$HEAD.tar.gz + +#clean debian folder +cd / +rm -Rf debian/ + +#return to working directory +cd $DEFAULT_DIR + +#copy debian folder +cp -r debian/ qelectrotech-$VERSION.r$HEAD/ + +#update changelog to new release +cd qelectrotech-$VERSION.r$HEAD/ +dch -d -D unstable "New upstream subversion version " +#edit changelog +echo -e "\033[1;31mWould you like to edit changelog n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + echo -e "\033[1;31mEdit debian changelog..\033[m" + dch --edit + else +echo -e "\033[1;33mNo edit changelog.\033[m" +fi + +cd debian/ && rm -rf *ex *EX README* + +cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/debian/patches/ +sed -i 's/'"$tagName+[0-9]*"'/'"$tagName+$GITCOMMIT"'/' 03_qet.diff + + +#deplacement dans le paquet_qet +cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/ +quilt push +quilt push +quilt refresh + +echo -e "\033[1;31mWould you like to build Debian packages n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + +#build +echo -e "\033[1;34mBuild_all_environements.\033[m" + sudo DIST=sid ARCH=amd64 pdebuild --configfile /home/laurent/.pbuilderrc + sudo DIST=sid ARCH=i386 pdebuild --configfile /home/laurent/.pbuilderrc + dch -i -D stable "Backport stable " && + sudo DIST=stable ARCH=amd64 pdebuild --configfile /home/laurent/.pbuilderrc + sudo DIST=stable ARCH=i386 pdebuild --configfile /home/laurent/.pbuilderrc +STRING="Build_all_environements is ready!!!" +echo $STRING + +#save debian/ +#echo -e "\033[1;33mDebian sauvegardé.\033[m" +#cp -r debian/ $DEFAULT_DIR + +#prepare download copys +cd $DEFAULT_DIR +mkdir -p $HEAD/stable/amd64 +mkdir -p $HEAD/stable/i386 +mkdir -p $HEAD/sid/amd64 +mkdir -p $HEAD/sid/i386 + +#copie des debs des results vers $HEAD +find /var/cache/pbuilder/stable-amd64/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/stable/amd64 \; +find /var/cache/pbuilder/stable-i386/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/stable/i386 \; +find /var/cache/pbuilder/unstable-amd64/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/sid/amd64 \; +find /var/cache/pbuilder/unstable-i386/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/sid/i386 \; + +#debsign +echo -e "\033[1;31mWould you like to sign all packages n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + +#debsign stable amd64 +cd $DEFAULT_DIR/$HEAD/stable/amd64 +debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes +echo -e "\033[1;33mAll stable amd64 are sign.\033[m" + +#debsign sid amd64 +cd $DEFAULT_DIR/$HEAD/sid/amd64 +debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes +echo -e "\033[1;33mAll sid amd64 are sign.\033[m" + + +#debsign stable i386 +cd $DEFAULT_DIR/$HEAD/stable/i386 +debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes +echo -e "\033[1;33mAll stable i386 are sign.\033[m" + +#debsign sid i386 +cd $DEFAULT_DIR/$HEAD/sid/i386 +debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes +echo -e "\033[1;33mAll sid i386 are sign.\033[m" + +else + echo -e "\033[1;33mExit.\033[m" +fi + +#upload vers incoming +echo -e "\033[1;31mWould you like to upload to incoming n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + echo -e "\033[1;33mUpload qelectrotech-$VERSION.r$HEAD.\033[m" + + +cd ~/apt +#rm db/* +reprepro -vb . include unstable $DEFAULT_DIR/$HEAD/sid/amd64/*.changes +reprepro -vb . includedeb unstable $DEFAULT_DIR/$HEAD/sid/i386/*i386.deb +reprepro -vb . include stable $DEFAULT_DIR/$HEAD/stable/amd64/*.changes +reprepro -vb . includedeb stable $DEFAULT_DIR/$HEAD/stable/i386/*i386.deb +reprepro -b . export + +else + echo -e "\033[1;33mExit.\033[m" +fi + +#rsync to TF +echo -e "\033[1;31mWould you like to RSYNC Debian packages to TF n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then +echo -e "\033[1;33mRsync to TF qelectrotech-$VERSION.r$HEAD .\033[m" +echo -e "\033[1;31mrsync to TF password ssh and TF\033[m" +cd $DEFAULT_DIR/script +rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress --exclude-from=ExclusionRSync ~/apt/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/debian/ +if [ $? != 0 ]; then +{ +echo "RSYNC ERROR: problem syncing qelectrotech-$VERSION.r$HEAD " +rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress --exclude-from=ExclusionRSync ~/apt/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/debian/ +} fi + +else + echo -e "\033[1;33mExit.\033[m" +fi + else +echo -e "\033[1;33mExit.\033[m" +fi + +############# Ubuntu packages ################################################################################################ + +echo -e "\033[1;31mWould you like to build Ubuntu PPA packages n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + +#deplacement dans le paquet_qet +cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/ + +#dch -i -D yakkety "Yakkety Upload to ppa" +#debuild -S -sa -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + +#dch -i -D xenial "Xenial Upload to ppa" +#debuild -S -sa -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + +#dch -i -D artful "Artful Upload to ppa" +#debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + +dch -i -D bionic "Bionic Upload to ppa" +debuild -S -sa -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + +dch -i -D eoan "Eoan Upload to ppa" +debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + +dch -i -D disco "Disco Upload to ppa" +debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + +cd $DEFAULT_DIR/ + +#dput my-ppa qelectrotech_$VERSION.r$HEAD-*ubuntu1_source.changes +#dput my-ppa qelectrotech_$VERSION.r$HEAD-*ubuntu2_source.changes +#dput my-ppa qelectrotech_$VERSION.r$HEAD-*ubuntu3_source.changes + +dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu1_source.changes +dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu2_source.changes +dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu3_source.changes +#dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu4_source.changes + +else + echo -e "\033[1;33mExit.\033[m" +fi + +############# Windows packages ################################################################################################ + +#copy and update folders of nsis_base skeleton +echo -e "\033[1;31mWould you like to build Window packages n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then +# 32 bits +cd $DEFAULT_DIR +cp -r qelectrotech-$VERSION.r$HEAD/ qelectrotech-$VERSION.r$HEAD-XP/ +cp -r nsis_base nsis_base$HEAD +cd qelectrotech-$VERSION.r$HEAD/ +cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_base$HEAD/files +cp -r lang/*.qm /$DEFAULT_DIR/nsis_base$HEAD/files/lang + +cd $DEFAULT_DIR +cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ +cp {lang_extra.nsh,QET.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_base$HEAD/ + +# 64 bits +cd $DEFAULT_DIR +cp -r nsis_base nsis_base64$HEAD +cd qelectrotech-$VERSION.r$HEAD/ +cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_base64$HEAD/files +cp -r lang/*.qm /$DEFAULT_DIR/nsis_base64$HEAD/files/lang + +cd $DEFAULT_DIR +cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ +cp {lang_extra.nsh,QET64.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_base64$HEAD/ + +#copy and update folders of readytouse_base skeleton +cd $DEFAULT_DIR +cp -r readytouse_base qelectrotech-$tagName+git$HEAD-x86-win32-readytouse +cd qelectrotech-$VERSION.r$HEAD/ +cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse +cp -r lang/*.qm /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/lang + +################################################################################################################# +export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win32/usr/bin:$PATH +#cross-compil 32 bits +cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD +mkdir build/ && cd build + +#mxe: qmake-qt5 i686-w64 +#/home/laurent/mxe/usr/bin/i686-w64-mingw32.static.posix-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro + +/media/backup6/digikam_new2/project/bundles/mxe/build.win32/usr/bin/i686-w64-mingw32.static-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro +#build jobs=17 +#build jobs=17 +#make -j17 +make -j$(nproc) + +#copy 32 bits binarie to /bin Windows packages +cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/build/release/ +cp qelectrotech.exe /$DEFAULT_DIR/nsis_base$HEAD/files/bin +cp qelectrotech.exe /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/bin + +#copy manifest file to /bin Windows packages +#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD +#cp qelectrotech.exe.manifest /$DEFAULT_DIR/nsis_base$HEAD/files/bin +#cp qelectrotech.exe.manifest /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/bin + +#tag $HEAD by sed for nsis script +cd $DEFAULT_DIR/nsis_base$HEAD +sed -i 's/'"0.5-dev+[0-9]*"'/'"$tagName"+git"$HEAD"'/' QET.nsi + +#build Windows installer +makensis QET.nsi + +################################################################################################################# +export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin:$PATH +#export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin:$PATH + +#cross-compil 64 bits +cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD +rm -r build/ +mkdir build/ && cd build +#mxe: qmake-qt5 x86_64-w64 +#/home/laurent/mxe/usr/bin/x86_64-w64-mingw32.static.posix-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro +/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro +#/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.static.posix.seh-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro +#build jobs=17 +#make -j17 +make -j$(nproc) + +cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/build/release/ +mv qelectrotech.exe /$DEFAULT_DIR/nsis_base64$HEAD/files/bin + +#copy manifest file to /bin Windows packages +#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD +#cp qelectrotech.exe.manifest /$DEFAULT_DIR/nsis_base64$HEAD/files/bin + +cd $DEFAULT_DIR/nsis_base64$HEAD + +sed -i 's/'"0.5-dev_x86_64-win64+[0-9]*"'/'"$tagName"_x86_64-win64+git"$HEAD"'/' QET64.nsi + +makensis QET64.nsi + +################################################################################################################# +#cross-compil 32 bits XP VISTA + +# WIN XP VISTA build +#cd $DEFAULT_DIR +#cp -r nsis_base nsis_baseXP$HEAD +#cd qelectrotech-$VERSION.r$HEAD/ +#cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_baseXP$HEAD/files +#cp -r elements/ examples/ titleblocks/ /$DEFAULT_DIR/nsis_base$HEAD/files +#cp -r lang/*.qm /$DEFAULT_DIR/nsis_baseXP$HEAD/files/lang + +#cd $DEFAULT_DIR +#cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ +#cp {lang_extra.nsh,QET.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_baseXP$HEAD/ + +#copy and update folders of readytouse_XP_base skeleton +#cd $DEFAULT_DIR +#cp -r readytouse_base qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse +#cd qelectrotech-$VERSION.r$HEAD/ +#cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse +#cp -r lang/*.qm /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse/lang + +#cd /home/$USER +#mv mxe mxe_old +#mv mxeXP mxe +#sleep 4 + +#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP + +#mkdir build/ && cd build + +#mxe: qmake-qt5 i686-w64 +#/home/laurent/mxe/usr/bin/i686-w64-mingw32.static.posix-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP/qelectrotech.pro +#/home/laurent/mxe/usr/bin/i686-w64-mingw32.static.posix-qmake-qt5.7 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP/qelectrotech.pro +#build jobs=17 +#make -j17 +#make -j$(nproc) + +#cd /home/$USER +#mv mxe mxeXP +#mv mxe_old mxe + +#copy 32 bits binarie to /bin Windows packages +#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP/build/release +#cp qelectrotech.exe /$DEFAULT_DIR/nsis_baseXP$HEAD/files/bin +#cp qelectrotech.exe /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse/bin + +#tag $HEAD by sed for nsis script +#cd $DEFAULT_DIR/nsis_baseXP$HEAD +#sed -i 's/'"0.5-dev+[0-9]*"'/'"$tagName"+git"$HEAD"'/' QET.nsi + +#build Windows installer +#makensis QET.nsi + +#crompress readytouse +cd $DEFAULT_DIR + +7za a -m0=lzma qelectrotech-$tagName+git$HEAD-x86-win32-readytouse.7z qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/ +#7za a -m0=lzma qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse.7z qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse/ + +echo -e "\033[1;31mWould you like to prepare to RSYNC Windows packages /Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + +cd /home/laurent/builds/nightly/ + +name=$(date +%Y-%m-%d-) #defined a name based on the date + +#start increment to 1 +i=1 +#increment by i if the builds have already been created +while [ "$(ls /home/$USER/builds/nightly/ | grep $name$i)" != "" ]; do + ((i++)) +done +#create a new folder incremented by 1 +mkdir /home/$USER/builds/nightly/$name$i +#mkdir /home/$USER/builds/nightly/$name$i/WIN_XP_VISTA + +cd $DEFAULT_DIR/ +cp qelectrotech-$tagName+git$HEAD-x86-win32-readytouse.7z /home/laurent/builds/nightly/$name$i +#cp qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse.7z /home/laurent/builds/nightly/$name$i/WIN_XP_VISTA +cd /$DEFAULT_DIR/nsis_base$HEAD +cp Installer_QElectroTech-$tagName+git$HEAD-1.exe /home/laurent/builds/nightly/$name$i +#cd /$DEFAULT_DIR/nsis_baseXP$HEAD +#cp Installer_QElectroTech-$tagName+git$HEAD-1.exe /home/laurent/builds/nightly/$name$i/WIN_XP_VISTA +cd $DEFAULT_DIR/nsis_base64$HEAD +cp Installer_QElectroTech-$tagName"_x86_64-win64+git"$HEAD-1.exe /home/laurent/builds/nightly/$name$i + +else + echo -e "\033[1;33mExit.\033[m" +fi + +#rsync to TF Windows builds +echo -e "\033[1;31mWould you like to upload Windows packages n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then +rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress /home/laurent/builds/nightly/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/builds/nightly/ +if [ $? != 0 ]; then +{ +echo "RSYNC ERROR: problem syncing qelectrotech-$VERSION.r$HEAD " +rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress /home/laurent/builds/nightly/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/builds/nightly/ +} fi + +#cd ~/paquet_qet/script +#sed -i 's/'[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9]'/'"$name$i"'/' dl_link.inc.php +#scp dl_link.inc.php "${SSH_TARGET}" + +else + echo -e "\033[1;33mExit.\033[m" +fi +else + echo -e "\033[1;33mExit.\033[m" +fi +exit diff --git a/packaging_script_Flatpak.sh b/packaging_script_Flatpak.sh new file mode 100755 index 000000000..677e0164f --- /dev/null +++ b/packaging_script_Flatpak.sh @@ -0,0 +1,37 @@ +#!/bin/bash +#set -x + +#delete old qet.h +rm sources/qet.h + +cd sources +git reset --hard origin/master + +cd .. + +# Fait une mise à jour +git pull +#git checkout test_pugi + +sed -i 's/DEFINES += QET_EXPORT_PROJECT_DB/#DEFINES += QET_EXPORT_PROJECT_DB/' qelectrotech.pro + +GITCOMMIT=$(git rev-parse --short HEAD) +A=$(git rev-list HEAD --count) +HEAD=$(($A+473)) + +VERSION=$(cat sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in GIT sources/qet.h +tagName=$(cat sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in GIT sources/qet.h + +# recupere le numero de la nouvelle revision +#revAp=$(svnversion | cut -d : -f 2 | tr -d '[:alpha:]') + +# On recupere le numero de version de l'originale +tagName=$(sed -n "s/const QString displayedVersion =\(.*\)/\1/p" sources/qet.h | cut -d\" -f2 | cut -d\" -f1 ) + +# On modifie l'originale avec le numero de revision du depot svn +sed -i 's/'"const QString displayedVersion =.*/const QString displayedVersion = \"$tagName+$GITCOMMIT\";"'/' sources/qet.h + +cd ~ +flatpak-builder --force-clean --ccache --repo=qet_git/0.8-dev qet_git/build-dir qet_git/build-aux/flatpak/org.qelectrotech.QElectroTech.json --gpg-sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --gpg-homedir=gpg +flatpak build-update-repo qet_git/0.8-dev --title="Development builds of QElectroTech" --prune --prune-depth=4 --generate-static-deltas --gpg-sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --gpg-homedir=gpg +rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress qet_git/0.8-dev/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/builds/Flatpak/ From d1c969b723ce2996dd90871fa6b7e37550ccc3b2 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sat, 7 Nov 2020 22:18:53 +0100 Subject: [PATCH 2/5] Purge old comment --- packaging_script_AppImage.sh | 8 +------- packaging_script_Flatpak.sh | 14 ++++---------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/packaging_script_AppImage.sh b/packaging_script_AppImage.sh index 070e0b155..647680fa4 100755 --- a/packaging_script_AppImage.sh +++ b/packaging_script_AppImage.sh @@ -15,13 +15,7 @@ GITCOMMIT=$(git rev-parse --short HEAD) A=$(git rev-list HEAD --count) HEAD=$(($A+473)) -VERSION=$(cat sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in GIT sources/qet.h -tagName=$(cat sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in GIT sources/qet.h - -# recupere le numero de la nouvelle revision -#revAp=$(svnversion | cut -d : -f 2 | tr -d '[:alpha:]') - -# On recupere le numero de version de l'originale +# We recover the version number of the original tagName=$(sed -n "s/const QString displayedVersion =\(.*\)/\1/p" sources/qet.h | cut -d\" -f2 | cut -d\" -f1 ) # On modifie l'originale avec le numéro de révision du dépôt GIT diff --git a/packaging_script_Flatpak.sh b/packaging_script_Flatpak.sh index 677e0164f..cf6fa3424 100755 --- a/packaging_script_Flatpak.sh +++ b/packaging_script_Flatpak.sh @@ -9,26 +9,20 @@ git reset --hard origin/master cd .. -# Fait une mise à jour +# get updates git pull -#git checkout test_pugi sed -i 's/DEFINES += QET_EXPORT_PROJECT_DB/#DEFINES += QET_EXPORT_PROJECT_DB/' qelectrotech.pro +# get the number of the new revision GITCOMMIT=$(git rev-parse --short HEAD) -A=$(git rev-list HEAD --count) -HEAD=$(($A+473)) -VERSION=$(cat sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in GIT sources/qet.h tagName=$(cat sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in GIT sources/qet.h -# recupere le numero de la nouvelle revision -#revAp=$(svnversion | cut -d : -f 2 | tr -d '[:alpha:]') - -# On recupere le numero de version de l'originale +# We recover the version number of the original tagName=$(sed -n "s/const QString displayedVersion =\(.*\)/\1/p" sources/qet.h | cut -d\" -f2 | cut -d\" -f1 ) -# On modifie l'originale avec le numero de revision du depot svn +# We modify the original with the revision number of the svn repository sed -i 's/'"const QString displayedVersion =.*/const QString displayedVersion = \"$tagName+$GITCOMMIT\";"'/' sources/qet.h cd ~ From e3b98001f36426fb6e62bcdab40bc5c333fd159c Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sat, 7 Nov 2020 22:19:54 +0100 Subject: [PATCH 3/5] Fix indentation restored --- packaging_script_Debian_Ubuntu_Windows.sh | 529 +++++++++------------- 1 file changed, 202 insertions(+), 327 deletions(-) diff --git a/packaging_script_Debian_Ubuntu_Windows.sh b/packaging_script_Debian_Ubuntu_Windows.sh index 5a3ad97d4..8290c45c1 100755 --- a/packaging_script_Debian_Ubuntu_Windows.sh +++ b/packaging_script_Debian_Ubuntu_Windows.sh @@ -9,37 +9,21 @@ TEMP_DIR="$HOME" SSH_TARGET='scorpio810@ssh.tuxfamily.org:/home/qet/qelectrotech.org-web/htdocs/dl_link.inc.php' SSH_OPTIONS=-B -#Find Subversion revision number in 0.60 branch -#if [ -z "$HEAD" ] ; then -#HEAD=$(svn --xml info svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60 | grep revision=\" | tail -1 | cut -d\" -f2) - -#fi - -#VERSION=$(svn cat svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60/sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in Subversion sources/qet.h -#tagName=$(svn cat svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60/sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in Subversion sources/qet.h cd $DEFAULT_DIR cd qet_git git pull -#git checkout test_pugi GITCOMMIT=$(git rev-parse --short HEAD) #Find Subversion revision number in trunk branch if [ -z "$HEAD" ] ; then -#HEAD=$(svn --xml info svn://svn.tuxfamily.org/svnroot/qet/qet/trunk | grep revision=\" | tail -1 | cut -d\" -f2) -A=$(git rev-list HEAD --count) -HEAD=$(($A+473)) + A=$(git rev-list HEAD --count) + HEAD=$(($A+473)) # force displayed number fi VERSION=$(cat sources/qet.h | grep "const QString version" | cut -d\" -f2 | cut -d\" -f1) #Find version tag in Subversion sources/qet.h tagName=$(cat sources/qet.h | grep displayedVersion | cut -d\" -f2 | cut -d\" -f1) #Find displayedVersion tag in Subversion sources/qet.h -#git ls-remote https://git.tuxfamily.org/qet/qet.git/ | head -1 | cut -c1-10 -#95d1fca171 -#git rev-list HEAD --count -#5475 - - #clean /var/cache/pbuilder/ .. / result/debs echo -e "\033[1;31mWould you like to clean all debs n/Y?.\033[m" @@ -50,7 +34,7 @@ if [[ $a == "Y" || $a == "y" ]]; then cd /var/cache/pbuilder/unstable-amd64/result/ && sudo rm qe* cd /var/cache/pbuilder/stable-i386/result/ && sudo rm qe* cd /var/cache/pbuilder/unstable-i386/result/ && sudo rm qe* - else +else echo -e "\033[1;33mNo Clean_all_base_environment.\033[m" fi #clean all apt cache @@ -62,31 +46,27 @@ if [[ $a == "Y" || $a == "y" ]]; then DIST=stable ARCH=amd64 sudo pbuilder --clean DIST=unstable ARCH=i386 sudo pbuilder --clean DIST=unstable ARCH=amd64 sudo pbuilder --clean - else - echo -e "\033[1;33mNo Clean_all_pbuilder_environment.\033[m" +else + echo -e "\033[1;33mNo Clean_all_pbuilder_environment.\033[m" fi #Update des chroots echo -e "\033[1;31mWould you like to update all chroots n/Y?.\033[m" read a if [[ $a == "Y" || $a == "y" ]]; then - echo -e "\033[1;33mUpdate_all_base_environment..\033[m" - sudo DIST=stable ARCH=i386 pbuilder update --override-config --configfile /home/laurent/.pbuilderrc - sudo DIST=sid ARCH=i386 pbuilder update --override-config --configfile /home/laurent/.pbuilderrc - sudo DIST=stable pbuilder update --override-config --configfile /home/laurent/.pbuilderrc - sudo DIST=sid pbuilder update --override-config --configfile /home/laurent/.pbuilderrc - else -echo -e "\033[1;33mNo Update_all_base_environment.\033[m" + echo -e "\033[1;33mUpdate_all_base_environment..\033[m" + sudo DIST=stable ARCH=i386 pbuilder update --override-config --configfile /home/laurent/.pbuilderrc + sudo DIST=sid ARCH=i386 pbuilder update --override-config --configfile /home/laurent/.pbuilderrc + sudo DIST=stable pbuilder update --override-config --configfile /home/laurent/.pbuilderrc + sudo DIST=sid pbuilder update --override-config --configfile /home/laurent/.pbuilderrc +else + echo -e "\033[1;33mNo Update_all_base_environment.\033[m" fi -echo -e "\033[1;34mdownload source qelectrotech-$VERSION.r$HEAD.\033[m" +echo -e "\033[1;34mdownload source qelectrotech-$VERSION.r$HEAD.\033[m" cd $TEMP_DIR -#get latest source revision -# svn export svn://svn.tuxfamily.org/svnroot/qet/qet/trunk --revision 5212 qelectrotech-$VERSION.r$HEAD/ # force a specific version in trunk -#svn export svn://svn.tuxfamily.org/svnroot/qet/qet/trunk qelectrotech-$VERSION.r$HEAD/ -#svn export svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60 qelectrotech-$VERSION.r$HEAD/ # Branch 0.61 cp -r $DEFAULT_DIR/qet_git/ $TEMP_DIR/qelectrotech-$VERSION.r$HEAD/ rm -rf qelectrotech-$VERSION.r$HEAD/.git #create svn tarball @@ -121,13 +101,13 @@ cp -r debian/ qelectrotech-$VERSION.r$HEAD/ cd qelectrotech-$VERSION.r$HEAD/ dch -d -D unstable "New upstream subversion version " #edit changelog -echo -e "\033[1;31mWould you like to edit changelog n/Y?.\033[m" +echo -e "\033[1;31mWould you like to edit changelog n/Y?.\033[m" read a if [[ $a == "Y" || $a == "y" ]]; then - echo -e "\033[1;31mEdit debian changelog..\033[m" - dch --edit - else -echo -e "\033[1;33mNo edit changelog.\033[m" + echo -e "\033[1;31mEdit debian changelog..\033[m" + dch --edit +else + echo -e "\033[1;33mNo edit changelog.\033[m" fi cd debian/ && rm -rf *ex *EX README* @@ -135,7 +115,6 @@ cd debian/ && rm -rf *ex *EX README* cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/debian/patches/ sed -i 's/'"$tagName+[0-9]*"'/'"$tagName+$GITCOMMIT"'/' 03_qet.diff - #deplacement dans le paquet_qet cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/ quilt push @@ -146,101 +125,94 @@ echo -e "\033[1;31mWould you like to build Debian packages n/Y?.\033[m" read a if [[ $a == "Y" || $a == "y" ]]; then -#build -echo -e "\033[1;34mBuild_all_environements.\033[m" - sudo DIST=sid ARCH=amd64 pdebuild --configfile /home/laurent/.pbuilderrc - sudo DIST=sid ARCH=i386 pdebuild --configfile /home/laurent/.pbuilderrc - dch -i -D stable "Backport stable " && - sudo DIST=stable ARCH=amd64 pdebuild --configfile /home/laurent/.pbuilderrc - sudo DIST=stable ARCH=i386 pdebuild --configfile /home/laurent/.pbuilderrc -STRING="Build_all_environements is ready!!!" -echo $STRING + #build + echo -e "\033[1;34mBuild_all_environements.\033[m" + sudo DIST=sid ARCH=amd64 pdebuild --configfile /home/laurent/.pbuilderrc + sudo DIST=sid ARCH=i386 pdebuild --configfile /home/laurent/.pbuilderrc + dch -i -D stable "Backport stable " && + sudo DIST=stable ARCH=amd64 pdebuild --configfile /home/laurent/.pbuilderrc + sudo DIST=stable ARCH=i386 pdebuild --configfile /home/laurent/.pbuilderrc + STRING="Build_all_environements is ready!!!" + echo $STRING -#save debian/ -#echo -e "\033[1;33mDebian sauvegardé.\033[m" -#cp -r debian/ $DEFAULT_DIR + #prepare download copys + cd $DEFAULT_DIR + mkdir -p $HEAD/stable/amd64 + mkdir -p $HEAD/stable/i386 + mkdir -p $HEAD/sid/amd64 + mkdir -p $HEAD/sid/i386 -#prepare download copys -cd $DEFAULT_DIR -mkdir -p $HEAD/stable/amd64 -mkdir -p $HEAD/stable/i386 -mkdir -p $HEAD/sid/amd64 -mkdir -p $HEAD/sid/i386 + #copie des debs des results vers $HEAD + find /var/cache/pbuilder/stable-amd64/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/stable/amd64 \; + find /var/cache/pbuilder/stable-i386/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/stable/i386 \; + find /var/cache/pbuilder/unstable-amd64/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/sid/amd64 \; + find /var/cache/pbuilder/unstable-i386/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/sid/i386 \; -#copie des debs des results vers $HEAD -find /var/cache/pbuilder/stable-amd64/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/stable/amd64 \; -find /var/cache/pbuilder/stable-i386/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/stable/i386 \; -find /var/cache/pbuilder/unstable-amd64/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/sid/amd64 \; -find /var/cache/pbuilder/unstable-i386/result -name "qe*" -exec cp {} $DEFAULT_DIR/$HEAD/sid/i386 \; + #debsign + echo -e "\033[1;31mWould you like to sign all packages n/Y?.\033[m" + read a + if [[ $a == "Y" || $a == "y" ]]; then -#debsign -echo -e "\033[1;31mWould you like to sign all packages n/Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then + #debsign stable amd64 + cd $DEFAULT_DIR/$HEAD/stable/amd64 + debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes + echo -e "\033[1;33mAll stable amd64 are sign.\033[m" -#debsign stable amd64 -cd $DEFAULT_DIR/$HEAD/stable/amd64 -debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes -echo -e "\033[1;33mAll stable amd64 are sign.\033[m" + #debsign sid amd64 + cd $DEFAULT_DIR/$HEAD/sid/amd64 + debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes + echo -e "\033[1;33mAll sid amd64 are sign.\033[m" -#debsign sid amd64 -cd $DEFAULT_DIR/$HEAD/sid/amd64 -debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes -echo -e "\033[1;33mAll sid amd64 are sign.\033[m" + #debsign stable i386 + cd $DEFAULT_DIR/$HEAD/stable/i386 + debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes + echo -e "\033[1;33mAll stable i386 are sign.\033[m" + #debsign sid i386 + cd $DEFAULT_DIR/$HEAD/sid/i386 + debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes + echo -e "\033[1;33mAll sid i386 are sign.\033[m" -#debsign stable i386 -cd $DEFAULT_DIR/$HEAD/stable/i386 -debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes -echo -e "\033[1;33mAll stable i386 are sign.\033[m" + else + echo -e "\033[1;33mExit.\033[m" + fi -#debsign sid i386 -cd $DEFAULT_DIR/$HEAD/sid/i386 -debsign -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 *.changes -echo -e "\033[1;33mAll sid i386 are sign.\033[m" + #upload vers incoming + echo -e "\033[1;31mWould you like to upload to incoming n/Y?.\033[m" + read a + if [[ $a == "Y" || $a == "y" ]]; then + echo -e "\033[1;33mUpload qelectrotech-$VERSION.r$HEAD.\033[m" + cd ~/apt + reprepro -vb . include unstable $DEFAULT_DIR/$HEAD/sid/amd64/*.changes + reprepro -vb . includedeb unstable $DEFAULT_DIR/$HEAD/sid/i386/*i386.deb + reprepro -vb . include stable $DEFAULT_DIR/$HEAD/stable/amd64/*.changes + reprepro -vb . includedeb stable $DEFAULT_DIR/$HEAD/stable/i386/*i386.deb + reprepro -b . export + + else + echo -e "\033[1;33mExit.\033[m" + fi + + #rsync to TF + echo -e "\033[1;31mWould you like to RSYNC Debian packages to TF n/Y?.\033[m" + read a + if [[ $a == "Y" || $a == "y" ]]; then + echo -e "\033[1;33mRsync to TF qelectrotech-$VERSION.r$HEAD .\033[m" + echo -e "\033[1;31mrsync to TF password ssh and TF\033[m" + cd $DEFAULT_DIR/script + rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress --exclude-from=ExclusionRSync ~/apt/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/debian/ + if [ $? != 0 ]; then + { + echo "RSYNC ERROR: problem syncing qelectrotech-$VERSION.r$HEAD " + rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress --exclude-from=ExclusionRSync ~/apt/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/debian/ + } fi + + else + echo -e "\033[1;33mExit.\033[m" + fi else - echo -e "\033[1;33mExit.\033[m" -fi - -#upload vers incoming -echo -e "\033[1;31mWould you like to upload to incoming n/Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then - echo -e "\033[1;33mUpload qelectrotech-$VERSION.r$HEAD.\033[m" - - -cd ~/apt -#rm db/* -reprepro -vb . include unstable $DEFAULT_DIR/$HEAD/sid/amd64/*.changes -reprepro -vb . includedeb unstable $DEFAULT_DIR/$HEAD/sid/i386/*i386.deb -reprepro -vb . include stable $DEFAULT_DIR/$HEAD/stable/amd64/*.changes -reprepro -vb . includedeb stable $DEFAULT_DIR/$HEAD/stable/i386/*i386.deb -reprepro -b . export - -else - echo -e "\033[1;33mExit.\033[m" -fi - -#rsync to TF -echo -e "\033[1;31mWould you like to RSYNC Debian packages to TF n/Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then -echo -e "\033[1;33mRsync to TF qelectrotech-$VERSION.r$HEAD .\033[m" -echo -e "\033[1;31mrsync to TF password ssh and TF\033[m" -cd $DEFAULT_DIR/script -rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress --exclude-from=ExclusionRSync ~/apt/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/debian/ -if [ $? != 0 ]; then -{ -echo "RSYNC ERROR: problem syncing qelectrotech-$VERSION.r$HEAD " -rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress --exclude-from=ExclusionRSync ~/apt/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/debian/ -} fi - -else - echo -e "\033[1;33mExit.\033[m" -fi - else -echo -e "\033[1;33mExit.\033[m" + echo -e "\033[1;33mExit.\033[m" fi ############# Ubuntu packages ################################################################################################ @@ -249,40 +221,26 @@ echo -e "\033[1;31mWould you like to build Ubuntu PPA packages n/Y?.\033[m" read a if [[ $a == "Y" || $a == "y" ]]; then -#deplacement dans le paquet_qet -cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/ + #deplacement dans le paquet_qet + cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/ -#dch -i -D yakkety "Yakkety Upload to ppa" -#debuild -S -sa -k D3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + dch -i -D bionic "Bionic Upload to ppa" + debuild -S -sa -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 -#dch -i -D xenial "Xenial Upload to ppa" -#debuild -S -sa -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + dch -i -D eoan "Eoan Upload to ppa" + debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 -#dch -i -D artful "Artful Upload to ppa" -#debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + dch -i -D disco "Disco Upload to ppa" + debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 -dch -i -D bionic "Bionic Upload to ppa" -debuild -S -sa -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 + cd $DEFAULT_DIR/ -dch -i -D eoan "Eoan Upload to ppa" -debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 - -dch -i -D disco "Disco Upload to ppa" -debuild -S -kD3439F4E2273F7DCD3228C9EBC9F825E1D4FB6C1 - -cd $DEFAULT_DIR/ - -#dput my-ppa qelectrotech_$VERSION.r$HEAD-*ubuntu1_source.changes -#dput my-ppa qelectrotech_$VERSION.r$HEAD-*ubuntu2_source.changes -#dput my-ppa qelectrotech_$VERSION.r$HEAD-*ubuntu3_source.changes - -dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu1_source.changes -dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu2_source.changes -dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu3_source.changes -#dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu4_source.changes + dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu1_source.changes + dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu2_source.changes + dput my-ppa-dev qelectrotech_$VERSION.r$HEAD-*ubuntu3_source.changes else - echo -e "\033[1;33mExit.\033[m" + echo -e "\033[1;33mExit.\033[m" fi ############# Windows packages ################################################################################################ @@ -291,208 +249,125 @@ fi echo -e "\033[1;31mWould you like to build Window packages n/Y?.\033[m" read a if [[ $a == "Y" || $a == "y" ]]; then -# 32 bits -cd $DEFAULT_DIR -cp -r qelectrotech-$VERSION.r$HEAD/ qelectrotech-$VERSION.r$HEAD-XP/ -cp -r nsis_base nsis_base$HEAD -cd qelectrotech-$VERSION.r$HEAD/ -cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_base$HEAD/files -cp -r lang/*.qm /$DEFAULT_DIR/nsis_base$HEAD/files/lang + # 32 bits + cd $DEFAULT_DIR + cp -r qelectrotech-$VERSION.r$HEAD/ qelectrotech-$VERSION.r$HEAD-XP/ + cp -r nsis_base nsis_base$HEAD + cd qelectrotech-$VERSION.r$HEAD/ + cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_base$HEAD/files + cp -r lang/*.qm /$DEFAULT_DIR/nsis_base$HEAD/files/lang -cd $DEFAULT_DIR -cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ -cp {lang_extra.nsh,QET.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_base$HEAD/ + cd $DEFAULT_DIR + cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ + cp {lang_extra.nsh,QET.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_base$HEAD/ -# 64 bits -cd $DEFAULT_DIR -cp -r nsis_base nsis_base64$HEAD -cd qelectrotech-$VERSION.r$HEAD/ -cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_base64$HEAD/files -cp -r lang/*.qm /$DEFAULT_DIR/nsis_base64$HEAD/files/lang + # 64 bits + cd $DEFAULT_DIR + cp -r nsis_base nsis_base64$HEAD + cd qelectrotech-$VERSION.r$HEAD/ + cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_base64$HEAD/files + cp -r lang/*.qm /$DEFAULT_DIR/nsis_base64$HEAD/files/lang -cd $DEFAULT_DIR -cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ -cp {lang_extra.nsh,QET64.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_base64$HEAD/ + cd $DEFAULT_DIR + cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ + cp {lang_extra.nsh,QET64.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_base64$HEAD/ -#copy and update folders of readytouse_base skeleton -cd $DEFAULT_DIR -cp -r readytouse_base qelectrotech-$tagName+git$HEAD-x86-win32-readytouse -cd qelectrotech-$VERSION.r$HEAD/ -cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse -cp -r lang/*.qm /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/lang + #copy and update folders of readytouse_base skeleton + cd $DEFAULT_DIR + cp -r readytouse_base qelectrotech-$tagName+git$HEAD-x86-win32-readytouse + cd qelectrotech-$VERSION.r$HEAD/ + cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse + cp -r lang/*.qm /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/lang -################################################################################################################# -export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win32/usr/bin:$PATH -#cross-compil 32 bits -cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD -mkdir build/ && cd build + ################################################################################################################# + export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win32/usr/bin:$PATH + #cross-compil 32 bits + cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD + mkdir build/ && cd build -#mxe: qmake-qt5 i686-w64 -#/home/laurent/mxe/usr/bin/i686-w64-mingw32.static.posix-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro + /media/backup6/digikam_new2/project/bundles/mxe/build.win32/usr/bin/i686-w64-mingw32.static-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro + make -j$(nproc) -/media/backup6/digikam_new2/project/bundles/mxe/build.win32/usr/bin/i686-w64-mingw32.static-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro -#build jobs=17 -#build jobs=17 -#make -j17 -make -j$(nproc) + #copy 32 bits binarie to /bin Windows packages + cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/build/release/ + cp qelectrotech.exe /$DEFAULT_DIR/nsis_base$HEAD/files/bin + cp qelectrotech.exe /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/bin -#copy 32 bits binarie to /bin Windows packages -cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/build/release/ -cp qelectrotech.exe /$DEFAULT_DIR/nsis_base$HEAD/files/bin -cp qelectrotech.exe /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/bin + #tag $HEAD by sed for nsis script + cd $DEFAULT_DIR/nsis_base$HEAD + sed -i 's/'"0.5-dev+[0-9]*"'/'"$tagName"+git"$HEAD"'/' QET.nsi -#copy manifest file to /bin Windows packages -#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD -#cp qelectrotech.exe.manifest /$DEFAULT_DIR/nsis_base$HEAD/files/bin -#cp qelectrotech.exe.manifest /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/bin + #build Windows installer + makensis QET.nsi -#tag $HEAD by sed for nsis script -cd $DEFAULT_DIR/nsis_base$HEAD -sed -i 's/'"0.5-dev+[0-9]*"'/'"$tagName"+git"$HEAD"'/' QET.nsi + ################################################################################################################# + export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin:$PATH -#build Windows installer -makensis QET.nsi + #cross-compil 64 bits + cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD + rm -r build/ + mkdir build/ && cd build + #mxe: qmake-qt5 x86_64-w64 + /media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro + make -j$(nproc) -################################################################################################################# -export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin:$PATH -#export PATH=/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin:$PATH + cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/build/release/ + mv qelectrotech.exe /$DEFAULT_DIR/nsis_base64$HEAD/files/bin -#cross-compil 64 bits -cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD -rm -r build/ -mkdir build/ && cd build -#mxe: qmake-qt5 x86_64-w64 -#/home/laurent/mxe/usr/bin/x86_64-w64-mingw32.static.posix-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro -/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro -#/media/backup6/digikam_new2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.static.posix.seh-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/qelectrotech.pro -#build jobs=17 -#make -j17 -make -j$(nproc) + cd $DEFAULT_DIR/nsis_base64$HEAD -cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD/build/release/ -mv qelectrotech.exe /$DEFAULT_DIR/nsis_base64$HEAD/files/bin + sed -i 's/'"0.5-dev_x86_64-win64+[0-9]*"'/'"$tagName"_x86_64-win64+git"$HEAD"'/' QET64.nsi -#copy manifest file to /bin Windows packages -#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD -#cp qelectrotech.exe.manifest /$DEFAULT_DIR/nsis_base64$HEAD/files/bin + makensis QET64.nsi -cd $DEFAULT_DIR/nsis_base64$HEAD + #crompress readytouse + cd $DEFAULT_DIR -sed -i 's/'"0.5-dev_x86_64-win64+[0-9]*"'/'"$tagName"_x86_64-win64+git"$HEAD"'/' QET64.nsi + 7za a -m0=lzma qelectrotech-$tagName+git$HEAD-x86-win32-readytouse.7z qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/ -makensis QET64.nsi + echo -e "\033[1;31mWould you like to prepare to RSYNC Windows packages /Y?.\033[m" + read a + if [[ $a == "Y" || $a == "y" ]]; then -################################################################################################################# -#cross-compil 32 bits XP VISTA + cd /home/laurent/builds/nightly/ -# WIN XP VISTA build -#cd $DEFAULT_DIR -#cp -r nsis_base nsis_baseXP$HEAD -#cd qelectrotech-$VERSION.r$HEAD/ -#cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/nsis_baseXP$HEAD/files -#cp -r elements/ examples/ titleblocks/ /$DEFAULT_DIR/nsis_base$HEAD/files -#cp -r lang/*.qm /$DEFAULT_DIR/nsis_baseXP$HEAD/files/lang + name=$(date +%Y-%m-%d-) #defined a name based on the date -#cd $DEFAULT_DIR -#cd qelectrotech-$VERSION.r$HEAD/build-aux/windows/ -#cp {lang_extra.nsh,QET.nsi,lang_extra_fr.nsh} /$DEFAULT_DIR/nsis_baseXP$HEAD/ + #start increment to 1 + i=1 + #increment by i if the builds have already been created + while [ "$(ls /home/$USER/builds/nightly/ | grep $name$i)" != "" ]; do + ((i++)) + done + #create a new folder incremented by 1 + mkdir /home/$USER/builds/nightly/$name$i -#copy and update folders of readytouse_XP_base skeleton -#cd $DEFAULT_DIR -#cp -r readytouse_base qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse -#cd qelectrotech-$VERSION.r$HEAD/ -#cp -r {elements,examples,titleblocks} /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse -#cp -r lang/*.qm /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse/lang + cd $DEFAULT_DIR/ + cp qelectrotech-$tagName+git$HEAD-x86-win32-readytouse.7z /home/laurent/builds/nightly/$name$i + cd /$DEFAULT_DIR/nsis_base$HEAD + cp Installer_QElectroTech-$tagName+git$HEAD-1.exe /home/laurent/builds/nightly/$name$i + cd $DEFAULT_DIR/nsis_base64$HEAD + cp Installer_QElectroTech-$tagName"_x86_64-win64+git"$HEAD-1.exe /home/laurent/builds/nightly/$name$i -#cd /home/$USER -#mv mxe mxe_old -#mv mxeXP mxe -#sleep 4 + else + echo -e "\033[1;33mExit.\033[m" + fi -#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP - -#mkdir build/ && cd build - -#mxe: qmake-qt5 i686-w64 -#/home/laurent/mxe/usr/bin/i686-w64-mingw32.static.posix-qmake-qt5 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP/qelectrotech.pro -#/home/laurent/mxe/usr/bin/i686-w64-mingw32.static.posix-qmake-qt5.7 $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP/qelectrotech.pro -#build jobs=17 -#make -j17 -#make -j$(nproc) - -#cd /home/$USER -#mv mxe mxeXP -#mv mxe_old mxe - -#copy 32 bits binarie to /bin Windows packages -#cd $DEFAULT_DIR/qelectrotech-$VERSION.r$HEAD-XP/build/release -#cp qelectrotech.exe /$DEFAULT_DIR/nsis_baseXP$HEAD/files/bin -#cp qelectrotech.exe /$DEFAULT_DIR/qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse/bin - -#tag $HEAD by sed for nsis script -#cd $DEFAULT_DIR/nsis_baseXP$HEAD -#sed -i 's/'"0.5-dev+[0-9]*"'/'"$tagName"+git"$HEAD"'/' QET.nsi - -#build Windows installer -#makensis QET.nsi - -#crompress readytouse -cd $DEFAULT_DIR - -7za a -m0=lzma qelectrotech-$tagName+git$HEAD-x86-win32-readytouse.7z qelectrotech-$tagName+git$HEAD-x86-win32-readytouse/ -#7za a -m0=lzma qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse.7z qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse/ - -echo -e "\033[1;31mWould you like to prepare to RSYNC Windows packages /Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then - -cd /home/laurent/builds/nightly/ - -name=$(date +%Y-%m-%d-) #defined a name based on the date - -#start increment to 1 -i=1 -#increment by i if the builds have already been created -while [ "$(ls /home/$USER/builds/nightly/ | grep $name$i)" != "" ]; do - ((i++)) -done -#create a new folder incremented by 1 -mkdir /home/$USER/builds/nightly/$name$i -#mkdir /home/$USER/builds/nightly/$name$i/WIN_XP_VISTA - -cd $DEFAULT_DIR/ -cp qelectrotech-$tagName+git$HEAD-x86-win32-readytouse.7z /home/laurent/builds/nightly/$name$i -#cp qelectrotech-$tagName+git$HEAD-WIN_XP-x86-win32-readytouse.7z /home/laurent/builds/nightly/$name$i/WIN_XP_VISTA -cd /$DEFAULT_DIR/nsis_base$HEAD -cp Installer_QElectroTech-$tagName+git$HEAD-1.exe /home/laurent/builds/nightly/$name$i -#cd /$DEFAULT_DIR/nsis_baseXP$HEAD -#cp Installer_QElectroTech-$tagName+git$HEAD-1.exe /home/laurent/builds/nightly/$name$i/WIN_XP_VISTA -cd $DEFAULT_DIR/nsis_base64$HEAD -cp Installer_QElectroTech-$tagName"_x86_64-win64+git"$HEAD-1.exe /home/laurent/builds/nightly/$name$i + #rsync to TF Windows builds + echo -e "\033[1;31mWould you like to upload Windows packages n/Y?.\033[m" + read a + if [[ $a == "Y" || $a == "y" ]]; then + rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress /home/laurent/builds/nightly/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/builds/nightly/ + if [ $? != 0 ]; then + { + echo "RSYNC ERROR: problem syncing qelectrotech-$VERSION.r$HEAD " + rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress /home/laurent/builds/nightly/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/builds/nightly/ + } fi + else + echo -e "\033[1;33mExit.\033[m" + fi else - echo -e "\033[1;33mExit.\033[m" -fi - -#rsync to TF Windows builds -echo -e "\033[1;31mWould you like to upload Windows packages n/Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then -rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress /home/laurent/builds/nightly/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/builds/nightly/ -if [ $? != 0 ]; then -{ -echo "RSYNC ERROR: problem syncing qelectrotech-$VERSION.r$HEAD " -rsync -e ssh -av --delete-after --no-owner --no-g --chmod=g+w --progress /home/laurent/builds/nightly/ scorpio810@ssh.tuxfamily.org:/home/qet/qet-repository/builds/nightly/ -} fi - -#cd ~/paquet_qet/script -#sed -i 's/'[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9]'/'"$name$i"'/' dl_link.inc.php -#scp dl_link.inc.php "${SSH_TARGET}" - -else - echo -e "\033[1;33mExit.\033[m" -fi -else - echo -e "\033[1;33mExit.\033[m" + echo -e "\033[1;33mExit.\033[m" fi exit From 0bfbc37bc9e2e9f411c88f9325debac3498a8719 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sat, 7 Nov 2020 22:38:28 +0100 Subject: [PATCH 4/5] Add git submodule instruction --- packaging_script_AppImage.sh | 9 ++++++++- packaging_script_Debian_Ubuntu_Windows.sh | 9 ++++++++- packaging_script_Flatpak.sh | 8 +++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/packaging_script_AppImage.sh b/packaging_script_AppImage.sh index 647680fa4..37e361e3b 100755 --- a/packaging_script_AppImage.sh +++ b/packaging_script_AppImage.sh @@ -8,7 +8,14 @@ cd sources git reset --hard origin/master cd .. -git pull +# get updates +echo -e "\033[1;31m uses the repo submodule (note not yet) n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + git submodule update --init --recursive +else + git pull +fi sed -i 's/DEFINES += QET_EXPORT_PROJECT_DB/#DEFINES += QET_EXPORT_PROJECT_DB/' qelectrotech.pro GITCOMMIT=$(git rev-parse --short HEAD) diff --git a/packaging_script_Debian_Ubuntu_Windows.sh b/packaging_script_Debian_Ubuntu_Windows.sh index 8290c45c1..fcdae972c 100755 --- a/packaging_script_Debian_Ubuntu_Windows.sh +++ b/packaging_script_Debian_Ubuntu_Windows.sh @@ -11,7 +11,14 @@ SSH_OPTIONS=-B cd $DEFAULT_DIR cd qet_git -git pull +# get updates +echo -e "\033[1;31m uses the repo submodule (note not yet) n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + git submodule update --init --recursive +else + git pull +fi GITCOMMIT=$(git rev-parse --short HEAD) diff --git a/packaging_script_Flatpak.sh b/packaging_script_Flatpak.sh index cf6fa3424..d0dd7b879 100755 --- a/packaging_script_Flatpak.sh +++ b/packaging_script_Flatpak.sh @@ -10,7 +10,13 @@ git reset --hard origin/master cd .. # get updates -git pull +echo -e "\033[1;31m uses the repo submodule (note not yet) n/Y?.\033[m" +read a +if [[ $a == "Y" || $a == "y" ]]; then + git submodule update --init --recursive +else + git pull +fi sed -i 's/DEFINES += QET_EXPORT_PROJECT_DB/#DEFINES += QET_EXPORT_PROJECT_DB/' qelectrotech.pro From f613f7fcdc90f3310730c1633e4f577e0eae2a55 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Fri, 13 Nov 2020 18:51:30 +0100 Subject: [PATCH 5/5] Mod git pull this works for git pull since Git 2.15 --- packaging_script_AppImage.sh | 9 ++------- packaging_script_Debian_Ubuntu_Windows.sh | 8 +------- packaging_script_Flatpak.sh | 8 +------- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/packaging_script_AppImage.sh b/packaging_script_AppImage.sh index 37e361e3b..5c6dc8f23 100755 --- a/packaging_script_AppImage.sh +++ b/packaging_script_AppImage.sh @@ -9,13 +9,8 @@ git reset --hard origin/master cd .. # get updates -echo -e "\033[1;31m uses the repo submodule (note not yet) n/Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then - git submodule update --init --recursive -else - git pull -fi +git pull --recurse-submodules + sed -i 's/DEFINES += QET_EXPORT_PROJECT_DB/#DEFINES += QET_EXPORT_PROJECT_DB/' qelectrotech.pro GITCOMMIT=$(git rev-parse --short HEAD) diff --git a/packaging_script_Debian_Ubuntu_Windows.sh b/packaging_script_Debian_Ubuntu_Windows.sh index fcdae972c..1f0e1c928 100755 --- a/packaging_script_Debian_Ubuntu_Windows.sh +++ b/packaging_script_Debian_Ubuntu_Windows.sh @@ -12,13 +12,7 @@ SSH_OPTIONS=-B cd $DEFAULT_DIR cd qet_git # get updates -echo -e "\033[1;31m uses the repo submodule (note not yet) n/Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then - git submodule update --init --recursive -else - git pull -fi +git pull --recurse-submodules GITCOMMIT=$(git rev-parse --short HEAD) diff --git a/packaging_script_Flatpak.sh b/packaging_script_Flatpak.sh index d0dd7b879..3e965e50a 100755 --- a/packaging_script_Flatpak.sh +++ b/packaging_script_Flatpak.sh @@ -10,13 +10,7 @@ git reset --hard origin/master cd .. # get updates -echo -e "\033[1;31m uses the repo submodule (note not yet) n/Y?.\033[m" -read a -if [[ $a == "Y" || $a == "y" ]]; then - git submodule update --init --recursive -else - git pull -fi +git pull --recurse-submodules sed -i 's/DEFINES += QET_EXPORT_PROJECT_DB/#DEFINES += QET_EXPORT_PROJECT_DB/' qelectrotech.pro