Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #266 from github-for-unity/fixes/location-location…
Browse files Browse the repository at this point in the history
…-location

Move extension installation location to Assets/Plugins/GitHub
  • Loading branch information
StanleyGoldman authored Sep 1, 2017
2 parents c9711a9 + 30e4af5 commit 201e18e
Show file tree
Hide file tree
Showing 37 changed files with 69 additions and 56 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Notices

From version 0.19 onwards, the location of the plugin has moved to `Assets/GitHub`. If you have version 0.18 or lower, you need to delete the `Assets/Editor/GitHub` folder before you install newer versions. You should exit Unity and delete the folder from Explorer/Finder, as Unity will not unload native libraries while it's running.
From version 0.19 onwards, the location of the plugin has moved to `Assets/Plugins/GitHub`. If you have version 0.18 or lower, you need to delete the `Assets/Editor/GitHub` folder before you install newer versions. You should exit Unity and delete the folder from Explorer/Finder, as Unity will not unload native libraries while it's running.

![Build Status](https://ci.appveyor.com/api/projects/status/github/github-for-unity/Unity?branch=master&svg=true)

Expand Down
38 changes: 19 additions & 19 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ if not %2.==. (
)

if %Target%==Rebuild (
del /Q unity\PackageProject\Assets\GitHub\Editor\*.dll
del /Q unity\PackageProject\Assets\GitHub\Editor\*.mdb
del /Q unity\PackageProject\Assets\GitHub\Editor\*.pdb

if exist "..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor" (
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor\*.dll
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor\*.mdb
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor\*.pdb
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\*.dll
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\*.mdb
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\*.pdb

if exist "..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor" (
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor\*.dll
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor\*.mdb
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor\*.pdb
)
)

Expand All @@ -28,18 +28,18 @@ call common\nuget.exe restore GitHub.Unity.sln
echo xbuild GitHub.Unity.sln /verbosity:normal /property:Configuration=%Configuration% /target:%Target%
call xbuild GitHub.Unity.sln /verbosity:normal /property:Configuration=%Configuration% /target:%Target%

del /Q unity\PackageProject\Assets\GitHub\Editor\deleteme*
del /Q unity\PackageProject\Assets\GitHub\Editor\deleteme*
del /Q unity\PackageProject\Assets\GitHub\Editor\*.xml
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\deleteme*
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\deleteme*
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\*.xml

echo xcopy /C /H /R /S /Y /Q unity\PackageProject\Assets\GitHub ..\github-unity-test\GitHubExtensionProject\Assets\
call xcopy /C /H /R /S /Y /Q unity\PackageProject\Assets\GitHub ..\github-unity-test\GitHubExtensionProject\Assets\
echo xcopy /C /H /R /S /Y /Q unity\PackageProject\Assets\Plugins\GitHub ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\
call xcopy /C /H /R /S /Y /Q unity\PackageProject\Assets\Plugins\GitHub ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\

echo xcopy /C /H /R /Y /Q unity\PackageProject\Assets\GitHub.meta ..\github-unity-test\GitHubExtensionProject\Assets\
call xcopy /C /H /R /Y /Q unity\PackageProject\Assets\GitHub.meta ..\github-unity-test\GitHubExtensionProject\Assets\
echo xcopy /C /H /R /Y /Q unity\PackageProject\Assets\Plugins\GitHub.meta ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\
call xcopy /C /H /R /Y /Q unity\PackageProject\Assets\Plugins\GitHub.meta ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\

if exist ..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor (
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor\deleteme*
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor\deleteme*
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor\*.xml
if exist ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor (
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor\deleteme*
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor\deleteme*
del /Q ..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor\*.xml
)
34 changes: 17 additions & 17 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ if [ $# -gt 1 ]; then
fi

if [ x"$Target" == x"Rebuild" ]; then
rm -f unity/PackageProject/Assets/GitHub/Editor/*.dll
rm -f unity/PackageProject/Assets/GitHub/Editor/*.mdb
rm -f unity/PackageProject/Assets/GitHub/Editor/*.pdb

if [ -e ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor ]; then
rm -f ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor/*.dll
rm -f ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor/*.mdb
rm -f ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor/*.pdb
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/*.dll
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/*.mdb
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/*.pdb

if [ -e ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor ]; then
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor/*.dll
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor/*.mdb
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor/*.pdb
fi
fi

Expand All @@ -34,16 +34,16 @@ fi

xbuild GitHub.Unity.sln /verbosity:normal /property:Configuration=$Configuration /target:$Target || true

rm -f unity/PackageProject/Assets/GitHub/Editor/deleteme*
rm -f unity/PackageProject/Assets/GitHub/Editor/deleteme*
rm -f unity/PackageProject/Assets/GitHub/Editor/*.xml
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/deleteme*
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/deleteme*
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/*.xml

cp -r unity/PackageProject/Assets/GitHub ../github-unity-test/GitHubExtensionProject/Assets/ || true
cp -r unity/PackageProject/Assets/GitHub.meta ../github-unity-test/GitHubExtensionProject/Assets/ || true
cp -r unity/PackageProject/Assets/Plugins/GitHub ../github-unity-test/GitHubExtensionProject/Assets/Plugins/ || true
cp -r unity/PackageProject/Assets/Plugins/GitHub.meta ../github-unity-test/GitHubExtensionProject/Assets/Plugins/ || true


if [ -e ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor ]; then
rm -f ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor/deleteme*
rm -f ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor/deleteme*
rm -f ../github-unity-test/GitHubExtensionProject/Assets/GitHub/Editor/*.xml
if [ -e ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor ]; then
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor/deleteme*
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor/deleteme*
rm -f ../github-unity-test/GitHubExtensionProject/Assets/Plugins/GitHub/Editor/*.xml
fi
2 changes: 1 addition & 1 deletion common/SolutionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
namespace System
{
internal static class AssemblyVersionInformation {
internal const string Version = "0.19.0.0";
internal const string Version = "0.19.0";
}
}
4 changes: 2 additions & 2 deletions common/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<PublishTo Condition="'$(PublishTo)' == '' ">$(SolutionDir)\unity\PackageProject\Assets\GitHub\Editor</PublishTo>
<ExternalPublishTo>$(SolutionDir)..\github-unity-test\GitHubExtensionProject\Assets\GitHub\Editor</ExternalPublishTo>
<PublishTo Condition="'$(PublishTo)' == '' ">$(SolutionDir)\unity\PackageProject\Assets\Plugins\GitHub\Editor</PublishTo>
<ExternalPublishTo>$(SolutionDir)..\github-unity-test\GitHubExtensionProject\Assets\Plugins\GitHub\Editor</ExternalPublishTo>
</PropertyGroup>

<!-- After the build is done, we copy all the artifacts into two locations:
Expand Down
8 changes: 4 additions & 4 deletions package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ if not exist "%Unity%" (
echo xbuild GitHub.Unity.sln /property:Configuration=%Configuration%
call xbuild GitHub.Unity.sln /property:Configuration=%Configuration%

del /Q unity\PackageProject\Assets\GitHub\Editor\deleteme*
del /Q unity\PackageProject\Assets\GitHub\Editor\*.pdb
del /Q unity\PackageProject\Assets\GitHub\Editor\*.pdb.meta
del /Q unity\PackageProject\Assets\GitHub\Editor\*.xml
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\deleteme*
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\*.pdb
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\*.pdb.meta
del /Q unity\PackageProject\Assets\Plugins\GitHub\Editor\*.xml

for /f tokens^=^2^ usebackq^ delims^=^" %%G in (`find "const string Version" common\SolutionInfo.cs`) do call :Package %%G

Expand Down
14 changes: 9 additions & 5 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ fi

xbuild GitHub.Unity.sln /property:Configuration=$Configuration

rm -f unity/PackageProject/Assets/GitHub/Editor/deleteme*
rm -f unity/PackageProject/Assets/GitHub/Editor/*.pdb
rm -f unity/PackageProject/Assets/GitHub/Editor/*.pdb.meta
rm -f unity/PackageProject/Assets/GitHub/Editor/*.xml
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/deleteme*
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/*.pdb
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/*.pdb.meta
rm -f unity/PackageProject/Assets/Plugins/GitHub/Editor/*.xml

Version=`sed -En 's,.*Version = "(.*)".*,\1,p' common/SolutionInfo.cs`
commitcount=`git rev-list --count HEAD`
commit=`git log -n1 --pretty=format:%h`
Version="${Version}.${commitcount}-${commit}"
Version=$Version
export GITHUB_UNITY_DISABLE=1
"$Unity" -batchmode -projectPath "`pwd`/unity/PackageProject" -exportPackage Assets/GitHub/Editor github-for-unity-$Version-alpha.unitypackage -force-free -quit
"$Unity" -batchmode -projectPath "`pwd`/unity/PackageProject" -exportPackage Assets/Plugins/GitHub/Editor github-for-unity-$Version.unitypackage -force-free -quit
4 changes: 2 additions & 2 deletions src/GitHub.Api/Resources/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/[Bb]uilds/

/Assets/AssetStoreTools*
/Assets/GitHub.meta
/Assets/GitHub/
/Assets/Plugins/GitHub.meta
/Assets/Plugins/GitHub/

# Visual Studio 2015 cache directory
/.vs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>GitHub.Unity</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<OutputPath>$(SolutionDir)\unity\TestProject\Assets\GitHub\Editor\</OutputPath>
<OutputPath>$(SolutionDir)\unity\TestProject\Assets\Plugins\GitHub\Editor\</OutputPath>
<IntermediateOutputPath>..\..\..\obj\</IntermediateOutputPath>
</PropertyGroup>
<Import Project="..\..\..\..\..\common\properties.props" />
Expand Down
8 changes: 4 additions & 4 deletions unity/PackageProject/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ProjectVersion.txt
Library/

// These files come from lib/
Assets/GitHub/Editor/libsfw.bundle.meta
Assets/GitHub/Editor/libsfw.so.meta
Assets/GitHub/Editor/x64/
Assets/GitHub/Editor/x86/
Assets/Plugins/GitHub/Editor/libsfw.bundle.meta
Assets/Plugins/GitHub/Editor/libsfw.so.meta
Assets/Plugins/GitHub/Editor/x64/
Assets/Plugins/GitHub/Editor/x86/
9 changes: 9 additions & 0 deletions unity/PackageProject/Assets/Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 201e18e

Please sign in to comment.