Created
August 25, 2014 14:30
-
-
Save NickDiMucci/93c29b0b0af955fc9cbb to your computer and use it in GitHub Desktop.
Script to automate build the Windows player of a Unity project, and committing build to a git repo.
This file contains hidden or 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
@echo off | |
set PROJECT=-projectPath | |
set PROJECT_PATH="C:\path\to\your\Unity\project" | |
set WIN_PATH="C:\path\to\your\game.exe" | |
@REM Common options | |
set BATCH=-batchmode | |
set QUIT=-quit | |
@REM Builds: | |
set WIN=-buildWindowsPlayer %WIN_PATH% | |
@REM Win32 build | |
echo Running Win Build for: %PROJECT_PATH% | |
echo "%PROGRAMFILES%\Unity\Editor\Unity.exe" %BATCH% %QUIT% %PROJECT% %PROJECT_PATH% %WIN% | |
"%ProgramFiles(x86)%\Unity\Editor\Unity.exe" %BATCH% %QUIT% %PROJECT% %PROJECT_PATH% %WIN% | |
echo Committing build to git | |
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) | |
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b) | |
echo %mydate%_%mytime% | |
git commit -a -m "Commit windows build %mydate%_%mytime%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment