File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,8 @@ name: Update GHC
22on :
33 schedule :
44 # run weekly on Thursday
5- - cron : ' 0 15 * * THU'
5+ - cron : ' 0 15 * * THU'
66 workflow_dispatch : # allows manual triggering
7-
87jobs :
98 update_ghc :
109 name : GHC ${{ matrix.ghc }} Update
2726 nix_path : nixpkgs=nixpkgs/default.nix
2827 - name : Fetch updates
2928 id : ghc_update
30- run : nix shell 'nixpkgs#bazel-buildtools' 'nixpkgs#python3' --command python .github/update-ghc.py ${{ matrix.ghc }}
29+ run : |-
30+ nix-shell -p 'bazel-buildtools' 'python3.withPackages (ps: [ps.packaging])' --run \
31+ 'python .github/update-ghc.py ${{ matrix.ghc }}'
3132 - name : Create Pull Request
3233 if : steps.ghc_update.outputs.latest != ''
3334 uses : peter-evans/create-pull-request@v7
Original file line number Diff line number Diff line change 88import json
99import sys
1010from urllib .request import urlopen
11- from distutils .version import StrictVersion
11+ from packaging .version import Version
1212
1313# Sometimes bindists have errors and are updated by new bindists.
1414# This dict is used to keep a version -> corrected_version mapping.
@@ -158,7 +158,7 @@ def fetch_bindists(grab):
158158
159159 ghc_versions = {
160160 version : ghc_bindists [version ]
161- for version in sorted (ghc_bindists .keys (), key = StrictVersion )
161+ for version in sorted (ghc_bindists .keys (), key = Version )
162162 }
163163
164164 json_file .truncate (0 )
You can’t perform that action at this time.
0 commit comments