Skip to content

Commit

Permalink
update python script
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmr committed Jan 2, 2024
1 parent 577890c commit 8333560
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/updateVersionName.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import toml
import os


# Specify the path to your TOML file
file_path = 'gradle/libs.versions.toml'

file_path = os.path.join('gradle', 'libs.versions.toml')

# Load the TOML file
with open(file_path, 'r') as file:
data = toml.load(file)

print("Current value of vName:", data['vName'])
# print("Data dictionary:", data)

# Print the current value of vName
current_vName = data['versions']['vName']
print("Current value of vName:", current_vName)

# Update the desired value
data['vName'] = '2.10'
data['versions']['vName'] = '2.10'

# Save the changes back to the file
with open(file_path, 'w') as file:
Expand All @@ -22,4 +25,4 @@
with open(file_path, 'r') as file:
updated_data = toml.load(file)

print("New value of vName:", data['vName'])
print("New value of vName:", data['versions']['vName'])

0 comments on commit 8333560

Please sign in to comment.