Skip to content

Commit

Permalink
Changed the app versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
gokadzev committed Mar 21, 2024
1 parent 6e45f21 commit 40ef666
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/API/version.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const appVersion = '7.6.2';
const appVersion = '2024.3.21';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository: https://github.com/gokadzev/Musify
issue_tracker: https://github.com/gokadzev/Musify/issues

publish_to: 'none'
version: 7.6.2+87 # run update.sh after changing the version
version: 2024.3.21+87 # run update.sh after changing the version

environment:
sdk: '>=3.3.0 <4.0.0'
Expand Down
22 changes: 22 additions & 0 deletions upstream.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
import datetime
import re

# Get today's date
today = datetime.date.today()
# Format date as YYYY.MM.DD
new_version = today.strftime("%Y.%-m.%-d")

# Open and read the pubspec.yaml file
with open('pubspec.yaml', 'r') as file:
data = file.read()

# Replace the version number with the new version
data = re.sub(r'version: \d+\.\d+\.\d+', 'version: ' + new_version, data)

# Write the updated content back to the file
with open('pubspec.yaml', 'w') as file:
file.write(data)

# Print message indicating the version update
print(f"Flutter version updated to {new_version}")

0 comments on commit 40ef666

Please sign in to comment.