Commit 1c4f1acc authored by eljamm's avatar eljamm
Browse files

linux_xanmod: customize update commit body

parent 1bdb7730
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ while IFS= read -r url; do
    fi
done < <(echo "$RELEASE_URLS" | jq -r)

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

URL="https://gitlab.com/api/v4/projects/xanmod%2Flinux/repository/archive.tar.gz?sha=$NEW_VERSION-$SUFFIX"
HASH="$(nix-prefetch fetchzip --quiet --url "$URL")"
@@ -87,3 +87,12 @@ update_variant() {
}

update_variant "$FILE_PATH" "$VARIANT" "$NEW_VERSION" "$HASH" "$SUFFIX"

# Customize commit
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#supported-features
COMMIT_BODY="
- Changelog: https://dl.xanmod.org/changelog/${NEW_VERSION%.*}/ChangeLog-$NEW_VERSION-xanmod1.gz
- Diff: https://gitlab.com/xanmod/linux/-/compare/$OLD_VERSION-xanmod1..$NEW_VERSION-xanmod1?from_project_id=51590166
"

jq -n --arg commitBody "$COMMIT_BODY" '[$ARGS.named]'
+10 −4
Original line number Diff line number Diff line
@@ -74,10 +74,16 @@ let
          RCU_EXP_KTHREAD = yes;
        };

        extraPassthru.updateScript = [
        extraPassthru.updateScript = {
          command = [
            ./update-xanmod.sh
            variant
          ];
          supportedFeatures = [
            "commit"
          ];
        };

        inherit isLTS;

        extraMeta = {