Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Atraxus committed Feb 19, 2024
1 parent 6c83385 commit 5003a06
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/releaseDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/artifacts/rayx-win64.zip/rayx-win64.zip
asset_path: ${{github.workspace}}/artifacts/rayx-win64.zip
asset_name: rayx-win64.zip
asset_content_type: application/zip

Expand All @@ -121,7 +121,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/artifacts/rayx-Linux.deb/rayx-Linux.deb
asset_path: ${{github.workspace}}/artifacts/rayx-Linux.deb
asset_name: rayx-Linux.deb
asset_content_type: application/x-deb

Expand Down
23 changes: 18 additions & 5 deletions Scripts/release.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import subprocess
import re
import os

def get_current_version():
try:
Expand All @@ -25,6 +26,21 @@ def increment_version(version, part='patch'):
# Add the 'v' prefix back to the version number
return f"v{major}.{minor}.{patch}"

def update_cmake_version(version):
try:
# Update root CMakeLists.txt
root_cmake_path = "CMakeLists.txt"
with open(root_cmake_path, "r") as file:
data = file.read()
data = re.sub(r'project\((\w+) VERSION \d+\.\d+\.\d+\)', f'project(\\1 VERSION {version})', data)
with open(root_cmake_path, "w") as file:
file.write(data)
print(f"Updated {root_cmake_path}")

except Exception as e:
print(f"Error updating CMakeLists.txt: {e}")


def main():
current_version = get_current_version()
print(f"Current version: {current_version}")
Expand All @@ -38,17 +54,14 @@ def main():
print("Error: Version must follow vMAJOR.MINOR.PATCH format.")
return

doc_updated = input("Have you updated the docs/changes/lastChanges.md file? [y/N]: ").strip().lower()
if doc_updated not in ('y', 'yes'):
print("Please update the docs/changes/lastChanges.md file before proceeding.")
return

confirmation = input(f"Are you sure you want to tag and commit as {new_version}? [Y/n]: ").strip().lower()
if confirmation not in ('y', 'yes', ''):
print("Aborted.")
return

try:
# Update CMakeLists.txt
update_cmake_version(new_version)
subprocess.run(["git", "tag", "-a", new_version, "-m", f"Version {new_version}"], check=True)
print(f"Successfully tagged with {new_version}")
# Provide the user with the command to push the tag
Expand Down
8 changes: 0 additions & 8 deletions docs/changes/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions docs/changes/lastChanges.md

This file was deleted.

0 comments on commit 5003a06

Please sign in to comment.