do not complie windows twice, always pack to tgz

This commit is contained in:
Jakub
2020-05-21 10:24:23 +02:00
committed by Jakub Cuth
parent cb8a15a9fd
commit 390182d247
2 changed files with 4 additions and 14 deletions

View File

@ -148,14 +148,14 @@ build-windows:
# We need to install docker because qtdeploy builds for windows inside a docker container.
# Docker will connect to the dockerd daemon provided by the runner service docker:dind at tcp://docker:2375.
- curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
- apt-get update && apt-get -y install binutils-mingw-w64 zip
- apt-get update && apt-get -y install binutils-mingw-w64 tar gzip
- ln -s /usr/bin/x86_64-w64-mingw32-windres /usr/bin/windres
- go mod download
- TARGET_OS=windows make build
artifacts:
name: "bridge-windows-$CI_COMMIT_SHORT_SHA"
paths:
- bridge_*.zip
- bridge_*.tgz
expire_in: 2 week
mirror-repo:

View File

@ -28,7 +28,7 @@ ICO_FILES:=
EXE:=$(shell basename ${CURDIR})
ifeq "${TARGET_OS}" "windows"
EXE+=.exe
EXE:=${EXE}.exe
ICO_FILES:=logo.ico icon.rc icon_windows.syso
endif
ifeq "${TARGET_OS}" "darwin"
@ -37,15 +37,9 @@ ifeq "${TARGET_OS}" "darwin"
endif
EXE_TARGET:=${DEPLOY_DIR}/${TARGET_OS}/${EXE}
TGZ_TARGET:=bridge_${TARGET_OS}_${REVISION}.tgz
ZIP_TARGET:=bridge_${TARGET_OS}_${REVISION}.zip
ifeq "${TARGET_OS}" "windows"
BUILD_TARGET:=${ZIP_TARGET}
else
BUILD_TARGET:=${TGZ_TARGET}
endif
build: ${BUILD_TARGET}
build: ${TGZ_TARGET}
build-nogui:
go build ${BUILD_FLAGS_NOGUI} -o Desktop-Bridge cmd/Desktop-Bridge/main.go
@ -54,10 +48,6 @@ ${TGZ_TARGET}: ${DEPLOY_DIR}/${TARGET_OS}
rm -f $@
cd ${DEPLOY_DIR} && tar czf ../../../$@ ${TARGET_OS}
${ZIP_TARGET}: ${DEPLOY_DIR}/${TARGET_OS}
rm -f $@
cd ${DEPLOY_DIR} && zip -r ../../../$@ ${TARGET_OS}
${DEPLOY_DIR}/linux: ${EXE_TARGET}
cp -pf ./internal/frontend/share/icons/logo.svg ${DEPLOY_DIR}/linux/
cp -pf ./LICENSE ${DEPLOY_DIR}/linux/