Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ RUN sed -i \
# Development Preparation: run po4a and hugo
# =============================================================================

FROM alpine 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

Expand Down
4 changes: 4 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later

# =============================================================================
# sync docs, translate, and build hugo in Docker container
# =============================================================================

services:
reuse-web:
container_name: reuse-web
Expand Down
33 changes: 33 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: 2025 Free Software Foundation Europe <https://fsfe.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
{ pkgs ? import <nixpkgs> {} }:

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."
'';
}