forked from Robmaister/SharpNav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release, generating nuspecs in PowerShell.
Moved TravisCI project to Build/ directory.
- Loading branch information
1 parent
9aaf529
commit cb60027
Showing
10 changed files
with
121 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Don't commit the NuGet files, they are generated by the build script. | ||
*.nuspec | ||
*.nupkg |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<version>0.9.2</version> | ||
<authors>Robert Rouhani</authors> | ||
<owners>Robert Rouhani</owners> | ||
<licenseUrl>https://github.com/Robmaister/SharpNav/blob/master/LICENSE</licenseUrl> | ||
<projectUrl>https://github.com/Robmaister/SharpNav</projectUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>A fully-managed navigation mesh library.</description> | ||
<releaseNotes>Added dependencies to packages.</releaseNotes> | ||
<copyright>Copyright (c) 2013-2014 Robert Rouhani <[email protected]> and other contributors (see CONTRIBUTORS file).</copyright> | ||
<tags>Navigation Pathfinding NavMesh Nav Mesh Crowd Agent AI</tags> | ||
</metadata> | ||
</package> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>SharpNav.MonoGame</id> | ||
<dependencies> | ||
<dependency id="MonoGame.Binaries" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="..\Binaries\SharpNav\MonoGame\SharpNav.dll" target="lib\net40" /> | ||
</files> | ||
</package> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>SharpNav.OpenTK</id> | ||
<dependencies> | ||
<dependency id="OpenTK" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="..\Binaries\SharpNav\OpenTK\SharpNav.dll" target="lib\net40" /> | ||
</files> | ||
</package> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>SharpNav.SharpDX</id> | ||
<dependencies> | ||
<dependency id="SharpDX" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="..\Binaries\SharpNav\SharpDX\SharpNav.dll" target="lib\net40" /> | ||
</files> | ||
</package> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>SharpNav</id> | ||
</metadata> | ||
<files> | ||
<file src="..\Binaries\SharpNav\Standalone\SharpNav.dll" target="lib\net40" /> | ||
</files> | ||
</package> |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Remove-Item *.nupkg | ||
Remove-Item *.nuspec |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
$metadataFile = "./Metadata.xml" | ||
|
||
#make sure at least the metadata file exists | ||
if (-not (test-path $metadataFile)) { | ||
throw "Could not find Metadata.xml in the current directory." | ||
} | ||
|
||
[xml]$metaXml = Get-Content $metadataFile | ||
|
||
#Merge metadata file with each target | ||
foreach ($file in Get-ChildItem SharpNav*.xml) { | ||
[xml]$xml = Get-Content $file | ||
#merge top-level nodes | ||
foreach ($metaXmlNode in $metaXml.package.ChildNodes) { | ||
$xmlNode = $xml.SelectSingleNode("//package/" + $metaXmlNode.Name) | ||
if ($xmlNode) { | ||
foreach ($childNode in $metaXmlNode.ChildNodes) { | ||
$newNode = $xml.ImportNode($childNode, $true) | ||
$xmlNode.AppendChild($newNode) | out-null | ||
} | ||
} | ||
else { | ||
$newNode = $xml.ImportNode($metaXmlNode, $true) | ||
$xml.package.AppendChild($newNode) | out-null | ||
} | ||
} | ||
|
||
#save edited node | ||
($xml).Save((Join-Path -Path $file.DirectoryName -ChildPath ($file.BaseName + ".nuspec"))) | ||
} | ||
|
||
foreach ($file in Get-ChildItem *.nuspec) { | ||
NuGet Pack $file | out-null | ||
} | ||
|
||
$packages = Get-ChildItem *.nupkg | ||
|
||
"Packages to publish:" | ||
$packages | % { write-host ("`t- " + $_.Name) } | ||
|
||
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Publish" | ||
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "Don't Publish" | ||
$options = [System.Management.Automation.Host.ChoiceDescription[]]($no, $yes) | ||
|
||
$result = $host.ui.PromptForChoice("Upload packages", "Are you sure you want to publish these packages?", $options, 0) | ||
|
||
if ($result -eq 0) { | ||
"Upload aborted, nothing published." | ||
} | ||
elseif ($result -eq 1) { | ||
foreach ($package in $packages) { | ||
NuGet Push $package | ||
} | ||
} |