mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-04 07:02:12 +03:00
make the deprecated imports script produce a CSV
This commit is contained in:
parent
c2c673396e
commit
1a7a0181a0
@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
import csv
|
||||
import json
|
||||
import os.path as path
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
HERE = path.realpath(path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
@ -29,12 +30,13 @@ for module in modules:
|
||||
else:
|
||||
widgets[widget] = (current_version, [])
|
||||
|
||||
writer = csv.writer(sys.stdout)
|
||||
|
||||
for (widget, (latest, deprecated)) in widgets.items():
|
||||
for version in deprecated:
|
||||
subprocess.check_call([
|
||||
'elm-forbid-import',
|
||||
'forbid',
|
||||
writer.writerow((
|
||||
'{}.V{}'.format(widget, version),
|
||||
'--hint',
|
||||
'latest is V{}'.format(latest),
|
||||
])
|
||||
'upgrade to V{}'.format(latest),
|
||||
))
|
||||
|
||||
sys.stdout.close()
|
Loading…
Reference in New Issue
Block a user