cortex-command-community / Cortex-Command-Legacy-Mod-Converter

MIT License
4 stars 5 forks source link

Release workflow #147

Closed MyNameIsTrez closed 6 months ago

MyNameIsTrez commented 1 year ago

I'd like to have a release created on every commit, but if I have the ability to just press a button somewhere to trigger the action then that is alright as well.

If releases are created in some sort of container then py -m pip install --upgrade -r requirements.txt is the first thing that should be run.

A release is created by running pyinstaller --noconsole --onefile --icon="Media/legacy-mod-converter.ico" --add-data="Media/github-icon.png;Media" --add-data="Media/discord-icon.png;Media" --add-data=$stylua_path --name="Legacy Mod Converter" main.py NOTE that this creates an executable that boots and shows the GUI, but isn't able to convert mods since I haven't figured out yet how to add stylua.exe residing inside of the cortex-command-mod-converter-engine package to the compilation arguments.

This can be used to figure out where stylua.exe resides, but I haven't figured out how to use it during compilation yet:

engine_location_line=$(py -m pip show cortex-command-mod-converter-engine | grep Location)
read -r key engine_path <<< $engine_location_line
engine_path=$engine_path/cortex_command_mod_converter_engine
echo $engine_path

The converter versioning should contain two parts - the CCCP version name, and the mod converter version number. The title of the latest version of the converter for pre4 was Legacy Mod Converter 1.2 for CCCP pre4.0, so something like pre4.0_v1.2 would work.