rem Release version for Windows
rem 
rem This script allows you to:
rem      -Bump game version (patch).
rem      -Create a tag with the name passed in or release/<version> if no tag is passed in.
rem      -Push these changes to your repository.
rem 
rem This functionality is also available from Unity Editor (Hotel settings dialog)
rem 
rem Usage:
rem release_version.bat [skip_bump_version] [skip_tag] [tagName=<tag_name>]
rem  	skip_bump_version: Skip version bumping. When not passed in game version patch is bumped and pushed to the repository.
rem 	skip_tag: Skip tagging. When not passed in a tag is created and pushed to the repository. See tagName below to know more about the label used as a tag.
rem 	tagName: Label to use when tagging. When not passed in release/<version> is used as a tag name. Example: release/1.5.2

rem iOS version Get the script's path
rem SCRIPT_PATH=$(dirname `which $0`)
rem The script's parent folder contains a file that contains the Unit Editor path
rem SETTINGS_PATH=$SCRIPT_PATH/../
rem UNITY_PATH="$(cat $SETTINGS_PATH/unity_editor_path.txt)"
rem PROJECT_PATH="$(cat $SETTINGS_PATH/project_root_path.txt)"
rem $UNITY_PATH -batchmode -quit -projectPath $PROJECT_PATH -logFile log.txt -executeMethod Ubisoft.Hotel.PackageManager.Editor.PackageManagerMain.ReleaseVersion $*

rem Get the script's path
SET SCRIPT_PATH=%~dp0
rem The script's parent folder contains a file that contains the Unity Editor path
SET SETTINGS_PATH=%SCRIPT_PATH%..
set /p UNITY_PATH=<"%SETTINGS_PATH%\unity_editor_path.txt"
echo %UNITY_PATH%
set /p PROJECT_PATH=<%SETTINGS_PATH%\project_root_path.txt
%UNITY_PATH% -batchmode -quit -projectPath %PROJECT_PATH% -executeMethod Ubisoft.Hotel.PackageManager.Editor.PackageManagerMain.ReleaseVersion %*
echo Done!
pause

