From 21ce6307202e56df0d7fdd1dfd6abe195a2aabf8 Mon Sep 17 00:00:00 2001 From: Miguel Carneiro Date: Fri, 25 Aug 2023 01:46:55 +0100 Subject: [PATCH] Add build command to PR Add new build command to PR message --- src/Update.hs | 4 ++++ test_data/expected_pr_description_1.md | 4 ++++ test_data/expected_pr_description_2.md | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/Update.hs b/src/Update.hs index 53833b33..a4bc1905 100644 --- a/src/Update.hs +++ b/src/Update.hs @@ -568,6 +568,10 @@ prMessage updateEnv isBroken metaDescription metaHomepage metaChangelog rewriteM ``` nix-build -A $attrPath https://github.com/$ghUser/nixpkgs/archive/$commitRev.tar.gz ``` + Or: + ``` + nix build github:$ghUser/nixpkgs/$commitRev#$attrPath + ``` After you've downloaded or built it, look at the files and if there are any, run the binaries: ``` diff --git a/test_data/expected_pr_description_1.md b/test_data/expected_pr_description_1.md index 8e58bf65..9ad42ae7 100644 --- a/test_data/expected_pr_description_1.md +++ b/test_data/expected_pr_description_1.md @@ -55,6 +55,10 @@ meta.changelog for foobar is: "https://foobar-homepage.com/changelog/v1.2.3" ``` nix-build -A foobar https://github.com/r-ryantm/nixpkgs/archive/af39cf77a0d42a4f6771043ec54221ed.tar.gz ``` +Or: +``` +nix build github:r-ryantm/nixpkgs/af39cf77a0d42a4f6771043ec54221ed#foobar +``` After you've downloaded or built it, look at the files and if there are any, run the binaries: ``` diff --git a/test_data/expected_pr_description_2.md b/test_data/expected_pr_description_2.md index 529cf616..c7b39abe 100644 --- a/test_data/expected_pr_description_2.md +++ b/test_data/expected_pr_description_2.md @@ -55,6 +55,10 @@ meta.changelog for foobar is: "https://foobar-homepage.com/changelog/v1.2.3" ``` nix-build -A foobar https://github.com/r-ryantm/nixpkgs/archive/af39cf77a0d42a4f6771043ec54221ed.tar.gz ``` +Or: +``` +nix build github:r-ryantm/nixpkgs/af39cf77a0d42a4f6771043ec54221ed#foobar +``` After you've downloaded or built it, look at the files and if there are any, run the binaries: ```