Skip to content

Commit c0032e5

Browse files
authored
Improve binarycreator logging and fail if artifact is missing (#1898)
* Verbose binarycreator for debug purposes * Fail if no installer found for test
1 parent 36bcb1e commit c0032e5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

buildScripts/github/build_installer.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ set -euxo pipefail
33
BRANCH_NAME="${BRANCH_NAME:-${GITHUB_REF#refs/*/}}"
44
BRANCH_NAME=${BRANCH_NAME//\//-}
55

6-
QTBIN=${QTBIN:-$($EXECUTOR bash -c 'eval $(make qmake -n | cut -f 1 -d " ") -query QT_INSTALL_BINS')}
7-
case $RUNNER_OS in
6+
QTBIN="${QTBIN:-$($EXECUTOR bash -c 'eval $(make qmake -n | cut -f 1 -d " ") -query QT_INSTALL_BINS')}"
7+
case "$RUNNER_OS" in
88
macOS)
9-
QTIFWBIN=$HOME/qtifw/bin
9+
QTIFWBIN="$HOME"/qtifw/bin
1010
TSNAME="trik-studio-installer-mac-$BRANCH_NAME.dmg"
1111
;;
1212
Linux)
@@ -19,23 +19,23 @@ df -h .
1919

2020
NEED_DEPLOY=$([[ "$GITHUB_REPOSITORY" == "trikset/trik-studio" && "${PULLREQUESTNUMBER:-false}" == "false" ]] && echo true || echo false )
2121

22-
if $NEED_DEPLOY ; then
22+
if "$NEED_DEPLOY" ; then
2323
$EXECUTOR bash -c "mkdir -p $HOME/.ssh && install -m 600 /dev/null $HOME/.ssh/id_rsa && echo \"$ssh_key\" > $HOME/.ssh/id_rsa"
2424
fi
2525

26-
if [[ $RUNNER_OS == Linux ]] ; then
26+
if [[ "$RUNNER_OS" == Linux ]] ; then
2727
echo Start build checker archive
2828
$EXECUTOR bash -c "bin/build-checker-installer.sh"
29-
if $NEED_DEPLOY ; then
29+
if "$NEED_DEPLOY" ; then
3030
$EXECUTOR bash -c "rsync -v --rsh='ssh -o StrictHostKeyChecking=no -vvv -i $HOME/.ssh/id_rsa' bin/trik_checker.tar.xz $username@$host:~/dl/ts/fresh/checker/checker-linux-$CONFIG-$BRANCH_NAME.tar.xz"
3131
fi
3232
fi
3333

3434
echo Start build installer
3535
$EXECUTOR bash -c "installer/build-trik-studio.sh $QTBIN $QTIFWBIN ."
3636

37-
INSTALLER_NAME=$(find installer -name "trik-studio*installer*" -print -quit)
37+
INSTALLER_NAME=$(find installer -name "trik-studio*installer*" -print -quit | grep . )
3838

39-
if $NEED_DEPLOY ; then
39+
if "$NEED_DEPLOY" ; then
4040
$EXECUTOR bash -c "rsync -v --rsh='ssh -o StrictHostKeyChecking=no -vvv -i $HOME/.ssh/id_rsa' $INSTALLER_NAME $username@$host:~/dl/ts/fresh/installer/$TSNAME"
4141
fi

installer/build-installer.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ find $PWD/packages/$PRODUCT -name prebuild-$OS.sh | bash -xe
8181
find . -type d -empty -delete
8282

8383
#echo "Building online installer..."
84-
#$QTIFW_DIR/binarycreator --online-only -c config/$PRODUCT-$OS_EXT.xml -p packages/qreal-base -p packages/$PRODUCT ${*:4} $PRODUCT-online-$OS_EXT-installer
84+
#$QTIFW_DIR/binarycreator --verbose --online-only -c config/$PRODUCT-$OS_EXT.xml -p packages/qreal-base -p packages/$PRODUCT ${*:4} $PRODUCT-online-$OS_EXT-installer
8585

8686
echo "Building offline installer..."
8787
case $(uname -s || echo None) in
8888
Linux) INSTALLER_EXT=.run;;
8989
Darwin) INSTALLER_EXT=.dmg;;
9090
*) INSTALLER_EXT=.exe;;
9191
esac
92-
$QTIFW_DIR/binarycreator --offline-only -c config/$PRODUCT-$OS_EXT.xml -p packages/qreal-base -p packages/$PRODUCT $PRODUCT-offline-$OS_EXT-installer$ADD_BIT-${FULL_VERSION}${INSTALLER_EXT}
92+
"$QTIFW_DIR"/binarycreator --verbose --offline-only -c "config/$PRODUCT-$OS_EXT.xml" -p packages/qreal-base -p "packages/$PRODUCT" "$PRODUCT-offline-$OS_EXT-installer$ADD_BIT-${FULL_VERSION}${INSTALLER_EXT}"
9393

9494
grep -r -l --include=*.xml '<Version>.*</Version>' . | xargs $GNU_SED_COMMAND -i -e "s/<Version>.*<\/Version>/<Version><\/Version>/"
9595

96-
[ -f $SSH_DIR/id_rsa ] && : || { echo "Done"; exit 0; }
96+
[ -f "$SSH_DIR/id_rsa" ] && : || { echo "Done"; exit 0; }
9797

9898
#echo "Building updates repository... This step can be safely skipped, the offline installer is already ready, press Ctrl+C if you are not sure what to do next."
9999
#rm -rf $PRODUCT-repository
@@ -103,6 +103,6 @@ grep -r -l --include=*.xml '<Version>.*</Version>' . | xargs $GNU_SED_COMMAND -i
103103
#scp -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -r $PRODUCT-repository/* qrealproject@195.19.241.150:/home/qrealproject/public/packages/$PRODUCT-repo-$OS_EXT
104104

105105
echo "Removing temporary files..."
106-
rm -rf $PRODUCT-repository
106+
rm -rf "$PRODUCT-repository"
107107

108108
echo "Done"

0 commit comments

Comments
 (0)