From 9f8e10420175b31557a3c9e15dc6337e9d5ec050 Mon Sep 17 00:00:00 2001 From: hl Date: Mon, 27 Oct 2025 12:04:05 +0100 Subject: [PATCH 1/3] drone: add nix shell --- .gitignore | 3 +++ shell.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore index c8a3547b..74e87436 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ site/content/*/* # Translation status file created by check_translations.py site/i18n/.status + +# nix shell created Drone token file +drone_token.txt diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..939546de --- /dev/null +++ b/shell.nix @@ -0,0 +1,33 @@ +# SPDX-FileCopyrightText: 2025 Free Software Foundation Europe +# +# SPDX-License-Identifier: GPL-3.0-or-later +{ pkgs ? import {} }: + +pkgs.mkShell { + # we assume the repo is cloned so git is available + # we assume awk is present + buildInputs = with pkgs; [ + drone-cli # signing + ]; + shellHook = '' + # DRONE + export DRONE_SERVER=https://drone.fsfe.org + export DRONE_TOKEN + + DRONE_FILE=drone_token.txt + if [[ -r $DRONE_FILE ]]; then + DRONE_TOKEN=$(cat $DRONE_FILE) + else + echo "Insert your drone token (found at $DRONE_SERVER/account)" + read -r -p "Token: " DRONE_TOKEN + echo -n $DRONE_TOKEN > $DRONE_FILE + fi + unset DRONE_FILE + + REPO_NAME="$(git remote get-url origin | awk -F "[:.]" '{printf $4}')" + alias save="drone sign --save $REPO_NAME && printf 'Hash saved!' && git add .drone.yml" + + echo "You are working on $REPO_NAME repository." + echo "Use the \"save\" alias to drone sign and git commit your drone.yml changes." + ''; +} From 7c1d40dfdbfcc18d1b01b1c413515c262a8b5a61 Mon Sep 17 00:00:00 2001 From: hl Date: Mon, 27 Oct 2025 12:07:09 +0100 Subject: [PATCH 2/3] Dockerfile: switch to fixed HUGO version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78e56d6d..f1fe018b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,10 +25,10 @@ RUN sed -i \ # Development Preparation: run po4a and hugo # ============================================================================= -FROM alpine:3.20 AS dev-prep +FROM git.fsfe.org/fsfe-system-hackers/hugo-container:0.152.0 AS dev-prep # Dependencies -RUN apk --no-cache add bash perl-yaml-tiny po4a hugo python3 diffutils +RUN apk --no-cache add bash perl-yaml-tiny po4a python3 diffutils COPY . /app From 0c54ca366ee8128dbb2d801fb985644f5479281b Mon Sep 17 00:00:00 2001 From: hl Date: Mon, 27 Oct 2025 12:47:20 +0100 Subject: [PATCH 3/3] docker-compose: remove legacy version label --- docker-compose.dev.yml | 1 - docker-compose.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 2d439113..c5acf08a 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -6,7 +6,6 @@ # sync docs, translate, and build hugo in Docker container # ============================================================================= -version: "3" services: reuse-web: container_name: reuse-web diff --git a/docker-compose.yml b/docker-compose.yml index f91412f3..293ec26e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,6 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -version: "3" services: reuse-web: container_name: reuse-web