about summary refs log tree commit diff
path: root/nixpkgs/maintainers/scripts/haskell/mark-broken.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/maintainers/scripts/haskell/mark-broken.sh')
-rwxr-xr-xnixpkgs/maintainers/scripts/haskell/mark-broken.sh22
1 files changed, 20 insertions, 2 deletions
diff --git a/nixpkgs/maintainers/scripts/haskell/mark-broken.sh b/nixpkgs/maintainers/scripts/haskell/mark-broken.sh
index 2624311aac9d..9aa9433b8023 100755
--- a/nixpkgs/maintainers/scripts/haskell/mark-broken.sh
+++ b/nixpkgs/maintainers/scripts/haskell/mark-broken.sh
@@ -10,6 +10,24 @@
 
 set -euo pipefail
 
+do_commit=false
+mark_broken_list_flags=""
+
+for arg in "$@"; do
+    case "$arg" in
+        --do-commit)
+            do_commit=true
+            ;;
+        --no-request-logs)
+            mark_broken_list_flags="$mark_broken_list_flags $arg"
+            ;;
+        *)
+            echo "$0: unknown flag: $arg"
+            exit 100
+            ;;
+    esac
+done
+
 broken_config="pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml"
 
 tmpfile=$(mktemp)
@@ -17,7 +35,7 @@ trap "rm ${tmpfile}" 0
 
 echo "Remember that you need to manually run 'maintainers/scripts/haskell/hydra-report.hs get-report' sometime before running this script."
 echo "Generating a list of broken builds and displaying for manual confirmation ..."
-maintainers/scripts/haskell/hydra-report.hs mark-broken-list | sort -i > "$tmpfile"
+maintainers/scripts/haskell/hydra-report.hs mark-broken-list $mark_broken_list_flags | sort -i > "$tmpfile"
 
 $EDITOR "$tmpfile"
 
@@ -34,7 +52,7 @@ clear="env -u HOME -u NIXPKGS_CONFIG"
 $clear maintainers/scripts/haskell/regenerate-hackage-packages.sh
 evalline=$(maintainers/scripts/haskell/hydra-report.hs eval-info)
 
-if [[ "${1:-}" == "--do-commit" ]]; then
+if $do_commit; then
 git add $broken_config
 git add pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
 git add pkgs/development/haskell-modules/hackage-packages.nix