Git-for-Unity/build.sh

47 строки
1.5 KiB
Bash
Исходник Обычный вид История

#!/bin/sh -eux
2017-06-08 23:25:10 +03:00
Configuration="dev"
if [ $# -gt 0 ]; then
Configuration=$1
fi
2017-04-20 22:50:59 +03:00
2017-04-27 18:02:57 +03:00
Target="Build"
if [ $# -gt 1 ]; then
Target=$2
fi
if [ x"$Target" == x"Rebuild" ]; then
rm -f unity/PackageProject/Assets/Editor/GitHub/*.dll
rm -f unity/PackageProject/Assets/Editor/GitHub/*.mdb
rm -f unity/PackageProject/Assets/Editor/GitHub/*.pdb
if [ -e ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub ]; then
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub/*.dll
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub/*.mdb
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub/*.pdb
fi
fi
OS="Mac"
if [ -e "/c/" ]; then
OS="Windows"
fi
if [ x"$OS" == x"Windows" ]; then
common/nuget restore
else
nuget restore
fi
xbuild GitHub.Unity.sln /verbosity:normal /property:Configuration=$Configuration /target:$Target || true
cp -r unity/PackageProject/Assets/Editor/GitHub ../github-unity-test/GitHubExtensionProject/Assets/Editor || true
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
rm -f unity/PackageProject/Assets/Editor/GitHub/*.xml
if [ -e ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub ]; then
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub/deleteme*
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub/deleteme*
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Editor/GitHub/*.xml
fi