Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions build/BuildNugets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,6 @@ $year = [System.DateTime]::Now.ToString("yyyy")
$copyright = "Copyright $year James Willock/Mulholland Software Ltd"
$configuration = "Release"

function Update-Icon {
param (
[string]$Path
)
$Path = Resolve-Path $Path
[xml] $xml = Get-Content $Path
[string] $iconUrl = $xml.package.metadata.iconUrl;
if (![string]::IsNullOrWhiteSpace($iconUrl) -and [string]::IsNullOrWhiteSpace($xml.package.metadata.icon)) {
$nugetIconFile = "$($xml.package.metadata.id).Icon.png";
$nugetIconPath = Join-Path (Split-Path $Path -Parent) $nugetIconFile
Write-Host "Downloading icon from $iconUrl to $nugetIconPath"
Invoke-WebRequest $iconUrl -OutFile "$nugetIconPath"
$files = $xml.SelectSingleNode("/package/files")
$iconFile = $xml.CreateElement("file")
$iconFile.SetAttribute("src", "$nugetIconFile")
$iconFile.SetAttribute("target", "images\")
$files.AppendChild($iconFile) | Out-Null

$iconElement = $xml.CreateElement("icon")
$iconElement.InnerText = "images\$nugetIconFile"
$xml.package.metadata.AppendChild($iconElement) | Out-Null
}
$xml.Save($Path)
}

function Update-Versions {
param (
[string]$Path
Expand All @@ -58,7 +33,6 @@ function New-Nuget {
)

$NuSpecPath = Resolve-Path $NuSpecPath
Update-Icon "$NuSpecPath"
nuget pack "$NuSpecPath" -version "$Version" -Properties "Configuration=$configuration;Copyright=$copyright"
}

Expand Down
Binary file added build/MaterialDesign.Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/MaterialDesignColors.Wpf/MaterialDesignColors.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<owners>James Willock</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit</projectUrl>
<iconUrl>http://materialdesigninxaml.net/images/MD4XAML32.png</iconUrl>
<icon>images\MaterialDesign.Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ResourceDictionary instances containing standard Google Material Design swatches,
for inclusion in a XAML application.</description>
Expand All @@ -23,6 +23,7 @@
</dependencies>
</metadata>
<files>
<file src="..\..\build\MaterialDesign.Icon.png" target="images\" />
<file src="..\..\README.md" target="docs\" />
<file src="bin\$configuration$\net462\MaterialDesignColors.*" target="lib\net462"
exclude="**\*.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<owners>James Willock</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit</projectUrl>
<iconUrl>http://materialdesigninxaml.net/images/MD4XAML32.png</iconUrl>
<icon>images\MaterialDesign.Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ResourceDictionary instances containing Material Design templates and styles for
WPF controls in the MahApps library.</description>
Expand All @@ -30,6 +30,7 @@
</dependencies>
</metadata>
<files>
<file src="..\..\build\MaterialDesign.Icon.png" target="images\" />
<file src="..\..\README.md" target="docs\" />
<file src="bin\$configuration$\net462\MaterialDesignThemes.MahApps.*" target="lib\net462"
exclude="**\*.json" />
Expand Down
3 changes: 2 additions & 1 deletion src/MaterialDesignThemes.Wpf/MaterialDesignThemes.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<owners>James Willock</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit</projectUrl>
<iconUrl>http://materialdesigninxaml.net/images/MD4XAML32.png</iconUrl>
<icon>images\MaterialDesign.Icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ResourceDictionary instances containing Material Design templates and styles for
WPF controls in .NET.</description>
Expand All @@ -28,6 +28,7 @@
</dependencies>
</metadata>
<files>
<file src="..\..\build\MaterialDesign.Icon.png" target="images\" />
<file src="..\..\README.md" target="docs\" />
<file src="bin\$configuration$\net462\MaterialDesignThemes.Wpf.*"
target="lib\net462" exclude="**\*.json" />
Expand Down
Loading