From 643e08734da3f1e3123933519eb3e73479709aaf Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sun, 5 Feb 2023 12:18:46 +0100 Subject: [PATCH] adding windocker stuff from bsys6 on this branch --- .gitlab-ci.yml | 7 +++++++ Makefile | 9 +++++++++ assets/windows.Dockerfile | 10 ++++++++++ assets/windows.mk | 27 +++++++++++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 assets/windows.Dockerfile create mode 100644 assets/windows.mk diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 488c0a5..edf94d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ Build Docker Images: when: manual only: - master + - windocker image: registry.gitlab.com/librewolf-community/browser/bsys5/dind # Needed because we aren't using our custom runners here services: @@ -27,6 +28,7 @@ Build Docker Images: - fedora36 - macos-x86_64 - macos-aarch64 + - windows - dind script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.gitlab.com @@ -49,6 +51,7 @@ Build: - fedora36 - macos-x86_64 - macos-aarch64 + - windows image: registry.gitlab.com/librewolf-community/browser/bsys5/dind tags: - autoscale @@ -68,6 +71,10 @@ Build: - librewolf-*.rpm.sha256sum - librewolf-*.dmg - librewolf-*.dmg.sha256sum + - librewolf-*-setup.exe + - librewolf-*-setup.exe.sha256sum + - librewolf-*-portable.zip + - librewolf-*-portable.zip.sha256sum reports: dotenv: variables.env diff --git a/Makefile b/Makefile index 65bb7da..ab87398 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ help : @echo " [docker-macos-x86_64], [docker-macos-aarch64]" @echo " [docker-tumbleweed]" @echo " [docker-dind]" + @echo " [docker-windows]" @echo "" @echo "build targets:" @echo " [debian11], [mint20], [mint21], [ubuntu20], [ubuntu21]" @@ -26,6 +27,7 @@ help : @echo " [fedora37], [fedora36]" @echo " [macos-x64_64], [macos-aarch64]" @echo " [tumbleweed]" + @echo " [windows]" @echo " [tarball]" @echo "" @@ -70,6 +72,8 @@ build : ${MAKE} clean ${MAKE} macos-aarch64 ${MAKE} clean + ${MAKE} windows + ${MAKE} clean push : docker push registry.gitlab.com/librewolf-community/browser/bsys5/debian11 @@ -210,6 +214,11 @@ docker-macos-aarch64 : macos-aarch64 : ${MAKE} -f assets/macos.mk arch=aarch64 build +## windows +docker-windows : + ${MAKE} -f assets/windows.mk docker +windows : + ${MAKE} -f assets/windows.mk build # # Docker in Docker (for GitLab CI) diff --git a/assets/windows.Dockerfile b/assets/windows.Dockerfile new file mode 100644 index 0000000..c1565a0 --- /dev/null +++ b/assets/windows.Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:latest +RUN apt-get -y update && apt-get -y upgrade && apt-get -y install bash git wget build-essential zip + +WORKDIR /root +RUN git clone https://gitlab.com/librewolf-community/browser/windows.git +WORKDIR /root/windows/linux + +RUN make setup-debian +RUN make fetch +RUN make bootstrap diff --git a/assets/windows.mk b/assets/windows.mk new file mode 100644 index 0000000..d0f3d17 --- /dev/null +++ b/assets/windows.mk @@ -0,0 +1,27 @@ +# windows.mk - build windows docker image and do build phase + +.PHONY : docker build + +version:=$(shell cat version) +release:=$(shell cat release) +source_release:=$(shell cat source_release) +full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)") + +outfile-exe=librewolf-$(full_version).en-US.win64-setup.exe +outfile-zip=librewolf-$(full_version).en-US.win64-portable.zip +outfiles=$(outfile-exe) $(outfile-zip) + +distro=windows +image=registry.gitlab.com/librewolf-community/browser/bsys5/$(distro):latest + +docker : + docker build -t $(image) - < assets/windows.Dockerfile + +build : + pwd + make all + cp -v $(outfiles) / + ( cd / && sha256sum $(outfile-exe) > $(outfile-exe).sha256sum ) + cat /$(outfile-exe).sha256sum + ( cd / && sha256sum $(outfile-zip) > $(outfile-zip).sha256sum ) + cat /$(outfile-zip).sha256sum