File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,8 @@ name: Update GHC
2
2
on :
3
3
schedule :
4
4
# run weekly on Thursday
5
- - cron : ' 0 15 * * THU'
5
+ - cron : ' 0 15 * * THU'
6
6
workflow_dispatch : # allows manual triggering
7
-
8
7
jobs :
9
8
update_ghc :
10
9
name : GHC ${{ matrix.ghc }} Update
27
26
nix_path : nixpkgs=nixpkgs/default.nix
28
27
- name : Fetch updates
29
28
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 }}'
31
32
- name : Create Pull Request
32
33
if : steps.ghc_update.outputs.latest != ''
33
34
uses : peter-evans/create-pull-request@v7
Original file line number Diff line number Diff line change 8
8
import json
9
9
import sys
10
10
from urllib .request import urlopen
11
- from distutils .version import StrictVersion
11
+ from packaging .version import Version
12
12
13
13
# Sometimes bindists have errors and are updated by new bindists.
14
14
# This dict is used to keep a version -> corrected_version mapping.
@@ -158,7 +158,7 @@ def fetch_bindists(grab):
158
158
159
159
ghc_versions = {
160
160
version : ghc_bindists [version ]
161
- for version in sorted (ghc_bindists .keys (), key = StrictVersion )
161
+ for version in sorted (ghc_bindists .keys (), key = Version )
162
162
}
163
163
164
164
json_file .truncate (0 )
You can’t perform that action at this time.
0 commit comments