lol

Merge pull request #138480 from cdepillabout/merge-and-open-pr-fixes

haskell: update maintainer script for merging and opening PR to also upload package versions to Hackage

authored by

Dennis Gosnell and committed by
GitHub
d7692eb8 c8eca71b

+29 -2
+6 -2
maintainers/scripts/haskell/merge-and-open-pr.sh
··· 75 75 echo "Merging https://github.com/NixOS/nixpkgs/pull/${curr_haskell_updates_pr_num}..." 76 76 gh pr merge --repo NixOS/nixpkgs --merge "$curr_haskell_updates_pr_num" 77 77 78 + # Update the list of Haskell package versions in NixOS on Hackage. 79 + echo "Updating list of Haskell package versions in NixOS on Hackage..." 80 + ./maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh 81 + 78 82 # Update stackage, Hackage hashes, and regenerate Haskell package set 79 83 echo "Updating Stackage..." 80 84 ./maintainers/scripts/haskell/update-stackage.sh --do-commit ··· 84 88 ./maintainers/scripts/haskell/regenerate-hackage-packages.sh --do-commit 85 89 86 90 # Push these new commits to the haskell-updates branch 87 - echo "Pushing commits just created to the haskell-updates branch" 91 + echo "Pushing commits just created to the remote haskell-updates branch..." 88 92 git push 89 93 90 94 # Open new PR ··· 114 118 EOF 115 119 ) 116 120 117 - echo "Opening a PR for the next haskell-updates merge cycle" 121 + echo "Opening a PR for the next haskell-updates merge cycle..." 118 122 gh pr create --repo NixOS/nixpkgs --base master --head haskell-updates --title "haskellPackages: update stackage and hackage" --body "$new_pr_body"
+1
maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
··· 19 19 username=$(grep "^username:" ~/.cabal/config | sed "s/^username: //") 20 20 password_command=$(grep "^password-command:" ~/.cabal/config | sed "s/^password-command: //") 21 21 curl -u "$username:$($password_command | head -n1)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv 22 + echo
+22
pkgs/development/haskell-modules/HACKING.md
··· 206 206 script uses the `gh` command to merge the current PR and open a new one. 207 207 You should only need to do this once. 208 208 209 + This command can be used to authenticate: 210 + 209 211 ```console 210 212 $ gh auth login 211 213 ``` 212 214 215 + This command can be used to confirm that you have already authenticated: 216 + 217 + ```console 218 + $ gh auth status 219 + ``` 220 + 221 + 1. Make sure you have setup your `~/.cabal/config` file for authentication 222 + for uploading the NixOS package versions to Hackage. See the following 223 + section for details on how to do this. 224 + 213 225 1. Make sure you have correctly marked packages broken. One of the previous 214 226 sections explains how to do this. 227 + 228 + In short: 229 + 230 + ```console 231 + $ ./maintainers/scripts/haskell/hydra-report.hs get-report 232 + $ ./maintainers/scripts/haskell/hydra-report.hs mark-broken-list 233 + $ ./maintainers/scripts/haskell/mark-broken.sh --do-commit 234 + ``` 215 235 216 236 1. Merge `master` into `haskell-updates` and make sure to push to the 217 237 `haskell-updates` branch. (This can be skipped if `master` has recently ··· 237 257 `origin/haskell-updates`. 238 258 239 259 1. Merges the currently open `haskell-updates` PR. 260 + 261 + 1. Updates the version of Haskell packages in NixOS on Hackage. 240 262 241 263 1. Updates Stackage and Hackage snapshots. Regenerates the Haskell package set. 242 264