diff --git a/current-version.ps1 b/current-version.ps1 new file mode 100644 index 0000000000..71c6d5b9dd --- /dev/null +++ b/current-version.ps1 @@ -0,0 +1,3 @@ +#!/usr/bin/env pwsh + +echo $(Get-Content pyproject.toml | Select-String -Pattern 'version = "(.*)"' | ForEach-Object { $_.Matches[0].Groups[1].Value }) diff --git a/take_release.py b/take_release.py index 52b9eedc29..9ba323edfb 100644 --- a/take_release.py +++ b/take_release.py @@ -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))