Unverified Commit 46b88e75 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

drupal: write updater script (#422506)

parents da33ae57 86a01455
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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 = {