Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Select the greater Python version available for a SCADE release #6

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
strategy:
matrix:
# scade-version: ['23.1', '23.2']
scade-version: ['23.1']
scade-version: ['23.2']
fail-fast: false
steps:
- name: Checkout
Expand Down
11 changes: 10 additions & 1 deletion get-scade-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,17 @@ runs:
shell: cmd
run: |
:: Retrieve Python name/directory
setlocal ENABLEDELAYEDEXPANSION
echo Get Python interpreter for "%INPUT_SCADE_DIR%"
for /f "usebackq" %%A in (`dir /B "%INPUT_SCADE_DIR%\contrib\Python*"`) do (set PYTHON_NAME=%%A)
set PYTHON_VERSION=0
for /f "usebackq" %%A in (`dir /B "%INPUT_SCADE_DIR%\contrib\Python*"`) do (
set CURRENT_VERSION=%%A
set CURRENT_VERSION=!CURRENT_VERSION:Python=%!
if !CURRENT_VERSION! GTR !PYTHON_VERSION! (
set PYTHON_VERSION=!CURRENT_VERSION!
)
)
set PYTHON_NAME=Python%PYTHON_VERSION%
echo Python name="%PYTHON_NAME%"
echo python-name=%PYTHON_NAME%>> %GITHUB_OUTPUT%
set PYTHON_DIR=%INPUT_SCADE_DIR%\contrib\%PYTHON_NAME%
Expand Down
Loading