Skip to content

Commit

Permalink
Update version_getter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lufre1 committed May 13, 2024
1 parent 664cce9 commit eb40755
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions deployment/version_getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
yaml = ruamel.yaml.YAML()
yaml.preserve_quotes = True

# Construct the filename based on OS name
construct_file = f"construct_{os.environ.get('RUNNER_OS')}.yaml"
# Get the current OS name from the environment variable
current_os = os.environ.get('RUNNER_OS').lower() # Ensure lowercase for comparison

# Construct the filename based on OS name (consider all possibilities)
if current_os == 'windows':
construct_file = "construct_windows-latest.yaml"
elif current_os == 'linux':
construct_file = "construct_ubuntu-latest.yaml" # Assuming ubuntu-latest for Linux
# Add an else block if you plan to support macOS in the future
else:
raise Exception(f"Unsupported OS: {current_os}")

# Load YAML using ruamel.yaml
yaml = ruamel.yaml.YAML()
Expand Down

0 comments on commit eb40755

Please sign in to comment.