From 72ea36a1de735dbc45cd25906067523afe9da0c3 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Wed, 13 Jul 2022 08:48:43 -0400
Subject: [PATCH] some debug tricks

---
 ci-tools/update-nixpkgs | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/ci-tools/update-nixpkgs b/ci-tools/update-nixpkgs
index 911848ec..7040bc5c 100755
--- a/ci-tools/update-nixpkgs
+++ b/ci-tools/update-nixpkgs
@@ -14,19 +14,25 @@ git checkout "${TARGET_BRANCH}" || git checkout -b "${TARGET_BRANCH}"
 # sort out this mess sooner rather than later...
 nix-shell ./shell.nix --run update-nixpkgs
 
+# Show us what we did
+git diff
+
 # nix-build -A morph -o result-after
 diff=$(nix --extra-experimental-features nix-command store diff-closures ./result-before/ ./result-after/)
 
 git commit -am "bump nixpkgs version"
 git push origin "${TARGET_BRANCH}:${TARGET_BRANCH}"
 
-BODY="{
-    \"id\": ${CI_PROJECT_ID},
-    \"source_branch\": \"${CI_COMMIT_REF_NAME}\",
-    \"target_branch\": \"${TARGET_BRANCH}\",
-    \"remove_source_branch\": true,
-    \"title\": \"WIP: ${CI_COMMIT_REF_NAME}\",
-    \"assignee_id\":\"jcalderone"
-}";
+BODY=$(cat <<EOF
+{
+    "id": ${CI_PROJECT_ID},
+    "source_branch": "${CI_COMMIT_REF_NAME}",
+    "target_branch": "${TARGET_BRANCH}",
+    "remove_source_branch": true,
+    "title": "WIP: ${CI_COMMIT_REF_NAME}",
+    "assignee_id":"jcalderone"
+}
+EOF
+    )
 
 curl -X POST --data "${BODY}" --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${UPDATE_NIXPKGS_PRIVATE_TOKEN}" "${HOST}/api/v4/projects/merge_requests"
-- 
GitLab