Compare commits

...

7 Commits

Author SHA1 Message Date
github-actions[bot]
6522b70066 Update version.json with commit count
Some checks failed
Bleeding Update version / update-version (push) Has been cancelled
Version Change Action / version-release (push) Has been cancelled
2025-01-29 02:03:17 +00:00
Nix
8d486a9af2
Update version.json 2025-01-28 23:03:07 -03:00
github-actions[bot]
97393e4ae7 Update version.json with commit count 2025-01-29 02:02:18 +00:00
Nix
e35120bb36
fixxed bleeding edge 2025-01-28 23:02:07 -03:00
github-actions[bot]
f2cfb3ceb3 Update version.json with commit count 2025-01-29 01:47:18 +00:00
Nix
15246cd535
Create Bleeding-Job.yaml 2025-01-28 22:47:06 -03:00
Nix
3edcd10c12
Update Build.yml 2025-01-28 22:43:44 -03:00
4 changed files with 84 additions and 7 deletions

36
.github/workflows/Bleeding-Job.yaml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Bleeding Update version
on:
push:
branches:
- main
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Update version.json
run: |
git fetch --prune --unshallow
commit_count=$(git rev-list --count HEAD)
version=$(jq -r '.version' version.json)
jq --arg versionBleeding "$version-$commit_count" '. + {versionBleeding: $versionBleeding}' version.json > version.tmp && mv version.tmp version.json
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add version.json
git commit -m "Update version.json with commit count"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -9,6 +9,8 @@ jobs:
version-release:
runs-on: windows-latest # Use Windows 10 runner
if: github.actor != 'github-actions[bot]' # Only run if the actor is not the GitHub Actions bot
steps:
- name: Checkout repository
uses: actions/checkout@v3
@ -36,7 +38,7 @@ jobs:
run: |
dir actions-temp
dir
- name: Get version and name from version.json
id: version_info
run: |

View File

@ -1162,8 +1162,22 @@ class PicomcVersionSelector(QWidget):
with open('version.json', 'r') as version_file:
version_data = json.load(version_file)
version_number = version_data.get('version', 'unknown version')
version_bleeding = version_data.get('versionBleeding', None)
except (FileNotFoundError, json.JSONDecodeError):
version_number = 'unknown version'
version_bleeding = None
# Check the configuration for IsBleeding
try:
with open('config.json', 'r') as config_file:
config_data = json.load(config_file)
is_bleeding = config_data.get('IsBleeding', False)
except (FileNotFoundError, json.JSONDecodeError):
is_bleeding = False
# Use versionBleeding if IsBleeding is true
if is_bleeding and version_bleeding:
version_number = version_bleeding
about_message = (
f"PicoDulce Launcher (v{version_number})\n\n"
@ -1180,7 +1194,9 @@ class PicomcVersionSelector(QWidget):
with open("version.json") as f:
local_version_info = json.load(f)
local_version = local_version_info.get("version")
local_version_bleeding = local_version_info.get("versionBleeding")
logging.info(f"Local version: {local_version}")
logging.info(f"Local bleeding version: {local_version_bleeding}")
with open("config.json") as config_file:
config = json.load(config_file)
@ -1189,10 +1205,20 @@ class PicomcVersionSelector(QWidget):
if local_version:
remote_version_info = self.fetch_remote_version()
remote_version = remote_version_info.get("version")
remote_version_bleeding = remote_version_info.get("versionBleeding")
logging.info(f"Remote version: {remote_version}")
if remote_version and (remote_version != local_version or is_bleeding):
logging.info(f"Remote bleeding version: {remote_version_bleeding}")
if is_bleeding:
remote_version_to_check = remote_version_bleeding
local_version_to_check = local_version_bleeding
else:
remote_version_to_check = remote_version
local_version_to_check = local_version
if remote_version_to_check and (remote_version_to_check != local_version_to_check):
if is_bleeding:
update_message = f"Do you want to update to the bleeding edge version ({remote_version})?"
update_message = f"Do you want to update to the bleeding edge version ({remote_version_bleeding})?"
else:
update_message = f"A new version ({remote_version}) is available!\nDo you want to download it now?"
update_dialog = QMessageBox.question(self, "Update Available", update_message, QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
@ -1213,7 +1239,9 @@ class PicomcVersionSelector(QWidget):
with open("version.json") as f:
local_version_info = json.load(f)
local_version = local_version_info.get("version")
local_version_bleeding = local_version_info.get("versionBleeding")
logging.info(f"Local version: {local_version}")
logging.info(f"Local bleeding version: {local_version_bleeding}")
with open("config.json") as config_file:
config = json.load(config_file)
@ -1222,10 +1250,20 @@ class PicomcVersionSelector(QWidget):
if local_version:
remote_version_info = self.fetch_remote_version()
remote_version = remote_version_info.get("version")
remote_version_bleeding = remote_version_info.get("versionBleeding")
logging.info(f"Remote version: {remote_version}")
if remote_version and (remote_version != local_version or is_bleeding):
logging.info(f"Remote bleeding version: {remote_version_bleeding}")
if is_bleeding:
remote_version_to_check = remote_version_bleeding
local_version_to_check = local_version_bleeding
else:
remote_version_to_check = remote_version
local_version_to_check = local_version
if remote_version_to_check and (remote_version_to_check != local_version_to_check):
if is_bleeding:
update_message = f"Do you want to update to the bleeding edge version ({remote_version})?"
update_message = f"Do you want to update to the bleeding edge version ({remote_version_bleeding})?"
else:
update_message = f"A new version ({remote_version}) is available!\nDo you want to download it now?"
update_dialog = QMessageBox.question(self, "Update Available", update_message, QMessageBox.Yes | QMessageBox.No, QMessageBox.No)

View File

@ -1,5 +1,5 @@
{
"version": "0.11.8",
"version": "0.11.9",
"links": [
"https://raw.githubusercontent.com/nixietab/picodulce/main/version.json",
"https://raw.githubusercontent.com/nixietab/picodulce/main/picodulce.py",
@ -7,5 +7,6 @@
"https://raw.githubusercontent.com/nixietab/picodulce/main/drums.gif",
"https://raw.githubusercontent.com/nixietab/picodulce/main/marroc.py",
"https://raw.githubusercontent.com/nixietab/picodulce/main/holiday.ico"
]
],
"versionBleeding": "0.11.9-151"
}