tools for exporting godot projects via Github Actions
Diffstat (limited to '.github/actions/get-export-name/get-export-name.py')
| -rwxr-xr-x | .github/actions/get-export-name/get-export-name.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/.github/actions/get-export-name/get-export-name.py b/.github/actions/get-export-name/get-export-name.py deleted file mode 100755 index 7fcbd77..0000000 --- a/.github/actions/get-export-name/get-export-name.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 - -import re -import sys - -map = { - 3: { - "android": "Android", - "linux": "Linux/X11", - "mac": "Mac OSX", - "web": "HTML5", - "windows": "Windows Desktop", - }, - 4: { - "android": "Android", - "linux": "Linux/X11", - "mac": "macOS", - "web": "Web", - "windows": "Windows Desktop", - } -} - -platform = f'{map[int(sys.argv[1])][sys.argv[2]]}' - -with open('export_presets.cfg', "r") as f: - export_presets = f.read() - regex = r'\[preset.[0-9]+\]\n+name="(.+)"\n+platform="%s"' % platform - matches = re.search( - regex, export_presets) - if matches: - print(matches.groups()[0]) - else: - sys.exit(1) |