Unverified Commit 6a677c61 authored by Alyssa Ross's avatar Alyssa Ross Committed by GitHub
Browse files

linux_xanmod, linux_xanmod_latest: 2025-12-18 (#472459)

parents 9ed2a106 723ea2ad
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p bash nix-prefetch curl jq gawk gnused nixfmt
#!nix-shell -I nixpkgs=./. -i bash -p bash nix curl jq gawk gnused nixfmt

set -euo pipefail

@@ -49,8 +49,13 @@ done < <(echo "$RELEASE_URLS" | jq -r)

>&2 echo "Updating Xanmod \"$VARIANT\" from $OLD_VERSION to $NEW_VERSION ($SUFFIX)"

prefetchURL() {
    result=$(nix-build -E "with import ./. {}; fetchzip { url=\"$1\"; hash=\"\"; }" 2>&1)
    echo "$result" | awk '/got:/ {print $NF}'
}

URL="https://gitlab.com/api/v4/projects/xanmod%2Flinux/repository/archive.tar.gz?sha=$NEW_VERSION-$SUFFIX"
HASH="$(nix-prefetch fetchzip --quiet --url "$URL")"
HASH="$(prefetchURL "$URL")"

update_variant() {
    local file_path="$1"
+4 −4
Original line number Diff line number Diff line
@@ -15,14 +15,14 @@ let
  variants = {
    # ./update-xanmod.sh lts
    lts = {
      version = "6.12.62";
      hash = "sha256-NAcE8ml7HDhpLNDKZEKlEFwdylRiFte+Gi+uxnlyVHQ=";
      version = "6.12.63";
      hash = "sha256-lrDglbhEch2/xtWayWcCw2Qm5qzTVa50Pwy2vn4ppCo=";
      isLTS = true;
    };
    # ./update-xanmod.sh main
    main = {
      version = "6.17.12";
      hash = "sha256-1IdlQEh+BQID91j/KpkJwzM3WMymbw/AXWpcEMitYfs=";
      version = "6.18.2";
      hash = "sha256-LSzoUpQiqVAeboKKyRzKyiYpuUbueJvHTtN5mm8EHL8=";
    };
  };