File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 11import argparse
2- import configparser
32import datetime
43import pathlib
54import re
65import shlex
76import subprocess
87import sys
8+ import tomllib
99
1010PROJECT = pathlib .Path (__file__ ).parent .parent
1111
1212# These files contain the version string that needs to be updated
1313citation_file = pathlib .Path ('CITATION.cff' )
1414version_files = [
15- pathlib .Path ('setup.cfg ' ),
15+ pathlib .Path ('pyproject.toml ' ),
1616 citation_file ,
1717]
1818
@@ -201,10 +201,9 @@ def maybe_push(
201201
202202
203203def get_current_version () -> str :
204- parser = configparser .ConfigParser ()
205- with open (PROJECT / 'setup.cfg' ) as f :
206- parser .read_file (f )
207- return parser .get ('metadata' , 'version' )
204+ with open (PROJECT / 'pyproject.toml' , 'rb' ) as f :
205+ pyproject = tomllib .load (f )
206+ return pyproject ['project' ]['version' ]
208207
209208
210209def call (* args : str ) -> None :
You can’t perform that action at this time.
0 commit comments