Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
building windows executable from latest commit for python repo
:: This is one script for auto package necessary files distributed to competitors for TeamStyle18 programming contest @EE.THU
:: github-release.exe is built from https://github.com/c4milo/github-release
cd teamstyle18
set GITHUB_TOKEN=[redacted]
git pull origin master
pyinstaller --onefile src/main.py
rename dist\main.exe dist\cpclash.exe
git log --oneline >githashtmp.txt
set /p latestcommit=<githashtmp.txt
set hash=%latestcommit:~0,6%
"C:\Program Files (x86)\7-Zip\7z.exe" a cpclash%hash%.zip player_files\ cpclash.exe
"C:\Program Files (x86)\7-Zip\7z.exe" d cpclash%hash%.zip player_files\sample
cd ..
github-release.exe K-Wu/ts18-release-kwu %hash% master "automated packaging" teamstyle18\cpclash%hash%.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment