From 86a014551a3b644ec5c1c39f557d6c1e5cec917e Mon Sep 17 00:00:00 2001 From: Andrew Benbow Date: Fri, 4 Jul 2025 15:43:37 -0400 Subject: [PATCH] drupal: write updater script --- pkgs/by-name/dr/drupal/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/dr/drupal/package.nix b/pkgs/by-name/dr/drupal/package.nix index 5ee358e3148e..03e532bcd82c 100644 --- a/pkgs/by-name/dr/drupal/package.nix +++ b/pkgs/by-name/dr/drupal/package.nix @@ -3,6 +3,7 @@ fetchFromGitLab, php, nixosTests, + writeScript, }: php.buildComposerProject2 (finalAttrs: { @@ -24,6 +25,13 @@ php.buildComposerProject2 (finalAttrs: { tests = { inherit (nixosTests) drupal; }; + updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts xmlstarlet + set -eu -o pipefail + version=$(curl -k --silent --globoff "https://updates.drupal.org/release-history/drupal/current" | xmlstarlet sel -t -v "project/releases/release[1]/tag") + update-source-version drupal $version --file=./pkgs/by-name/dr/drupal/package.nix + ''; }; meta = {