Created
March 3, 2017 12:26
-
-
Save K-Wu/36cbe47b1dd59c69c90507c58d4b7ec2 to your computer and use it in GitHub Desktop.
building windows executable from latest commit for python repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: 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