From 5608ff5b9c8f269bdb54b7a82644430e3d38e563 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 20 Apr 2023 18:49:34 -0500 Subject: [PATCH 1/2] feat: automated builds using GitLab's CI system --- .gitlab-ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..7b6c2f4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +# Build on bullseye +default: + image: debian:bullseye + +latest: + # Build the latest .deb file + stage: build + tags: [ docker ] + script: + - apt update && apt install -y build-essential fakeroot devscripts apache2-dev + - export DEBEMAIL="NOREPLY@`hostname -d`" + - mkdir -p builddir + - uscan --overwrite-download --destdir builddir + - cd ../nextcloud-server-* + - dpkg-buildpackage -rfakeroot + - cd - ; cp ../nextcloud-server_*.deb . + artifacts: + paths: + - '*.deb' From bee72d3ed270ba87719ab46161bc3b02886ca733 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 20 Apr 2023 20:51:42 -0500 Subject: [PATCH 2/2] feat: Check for new upstream release and alert us if there is one --- .gitlab-ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b6c2f4..ed80537 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,9 +11,22 @@ latest: - export DEBEMAIL="NOREPLY@`hostname -d`" - mkdir -p builddir - uscan --overwrite-download --destdir builddir - - cd ../nextcloud-server-* + - cd ../nextcloud-server-25* - dpkg-buildpackage -rfakeroot - cd - ; cp ../nextcloud-server_*.deb . artifacts: paths: - '*.deb' + +up_to_date: + # This job will succeed if we are up to date and fail if there is a later + # version of Nextcloud that we don't know about. The failure may result in + # emails going out to the maintainers so they quickly know about the need + # to update the package (adding any dependencies, etc.) + stage: build + tags: [ docker ] + script: + - apt update && apt install -y devscripts + - rc=0 + - uscan --no-download || rc=$? + - if [ $rc -eq 0 ]; then echo "Newer version available"; exit 1; fi