Tweak build and packaging scripts
This commit is contained in:
Родитель
622b28ec4a
Коммит
9b84e3641f
31
build.sh
31
build.sh
|
@ -4,8 +4,35 @@ if [ $# -gt 0 ]; then
|
||||||
Configuration=$1
|
Configuration=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nuget restore
|
Target="Build"
|
||||||
xbuild GitHub.Unity.sln /property:Configuration=$Configuration
|
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 /property:Configuration=$Configuration /target:$Target
|
||||||
|
|
||||||
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
|
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
|
||||||
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
|
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
|
||||||
|
|
18
package.sh
18
package.sh
|
@ -15,10 +15,6 @@ pushd src
|
||||||
git clean -xdf
|
git clean -xdf
|
||||||
popd
|
popd
|
||||||
|
|
||||||
nuget restore
|
|
||||||
xbuild GitHub.Unity.sln /property:Configuration=$Configuration
|
|
||||||
|
|
||||||
Unity=""
|
|
||||||
if [ -f "$1/Unity.app/Contents/MacOS/Unity" ]; then
|
if [ -f "$1/Unity.app/Contents/MacOS/Unity" ]; then
|
||||||
Unity="$1/Unity.app/Contents/MacOS/Unity"
|
Unity="$1/Unity.app/Contents/MacOS/Unity"
|
||||||
elif [ -f $1/Unity ]; then
|
elif [ -f $1/Unity ]; then
|
||||||
|
@ -27,6 +23,20 @@ else
|
||||||
echo "Can't find Unity in $1"
|
echo "Can't find Unity in $1"
|
||||||
exit 1
|
exit 1
|
||||||
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 /property:Configuration=$Configuration
|
||||||
|
|
||||||
|
|
||||||
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
|
rm -f unity/PackageProject/Assets/Editor/GitHub/deleteme*
|
||||||
rm -f unity/PackageProject/Assets/Editor/GitHub/*.pdb
|
rm -f unity/PackageProject/Assets/Editor/GitHub/*.pdb
|
||||||
rm -f unity/PackageProject/Assets/Editor/GitHub/*.xml
|
rm -f unity/PackageProject/Assets/Editor/GitHub/*.xml
|
||||||
|
|
Загрузка…
Ссылка в новой задаче