Skip to content

Commit

Permalink
fix script that updated toml file in too many places
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarlevin committed Oct 4, 2022
1 parent 04fba35 commit 651ce37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/prep_nightly.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def main():

# Update version (temporarily) in pyproject.toml:
for line in fileinput.input(Path(__file__).parent.parent/"pyproject.toml", inplace=True):
if 'version' in line:
if line.startswith("version"):
version = str(line.split('"')[1])
newversion = version+".dev"+datetime.now().strftime('%Y%m%d%H%M%S')
newversion = version+".dev"+datetime.now().strftime('%Y%m%d')
print(line.replace(line, f'version = "{newversion}"'.rstrip()))
else:
print(line.rstrip())
Expand Down

0 comments on commit 651ce37

Please sign in to comment.