Skip to content

Commit

Permalink
release scripts fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailprivalov committed Jan 11, 2024
1 parent 0e0439c commit 951c4ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions current-version.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env pwsh

echo $(Get-Content pyproject.toml | Select-String -Pattern 'version = "(.*)"' | ForEach-Object { $_.Matches[0].Groups[1].Value })
3 changes: 3 additions & 0 deletions take_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def get_release_info_from_github_by_version(version):

def get_current_version():
try:
if sys.platform == 'win32':
v = subprocess.check_output(["powershell", ".\\current-version.ps1"]).decode().strip()
return f'v{v}'
return f'v{subprocess.check_output(["./current-version.sh"]).decode().strip()}'
except subprocess.CalledProcessError as e:
print("Error: {}".format(e))
Expand Down

0 comments on commit 951c4ae

Please sign in to comment.