Created
August 25, 2016 21:01
-
-
Save kalineh/873cde0a6b101ef8431a0b1a94690ecd to your computer and use it in GitHub Desktop.
steam build helper script
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
working_directory=$(pwd) | |
cd "../Unity/MYGAME" | |
echo $(pwd) | |
git_hash=$(git rev-parse HEAD) | |
cd $working_directory | |
echo $working_directory | |
echo "Build Description: " | |
read input_description | |
sed 's/\$\$\$/'"[$git_hash]: $input_description"'/g' "./scripts/app_build_MYBUILDID.vdf" > "./scripts/current_build.vdf" | |
echo "Compiling.." | |
# NOTE: You need to manually set the unity install location | |
"C:\Program Files\Unity 5.4.0f3\Editor\Unity.exe" -batchmode -projectPath "$working_directory/../Unity/MYGAME" -buildWindows64Player "$working_directory/content/MYGAME/Windows/MYGAME.exe" -quit | |
cp "steam_appid.txt" "$working_directory\content\MYGAME\Windows\steam_appid.txt" | |
echo "Done compiling! Running build script.. " | |
echo "Username: " | |
read input_username | |
echo "Password: " | |
read -s input_password | |
echo "Starting build.." | |
mkdir "./builder" | |
cp "./steamcmd.exe" "./builder/steamcmd.exe" | |
"./builder/steamcmd.exe" +login $input_username $input_password +run_app_build_http "$working_directory/scripts/current_build.vdf" +quit | |
rm "./scripts/current_build.vdf" | |
echo "Build complete! Cleaning up.." | |
rm -rf "./builder" | |
rm -rf "./content" | |
rm -rf "./output" | |
echo "All done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment