From 450b87099b49785bdb17840778f46cb13fb9a09d Mon Sep 17 00:00:00 2001 From: Miodrag Milic Date: Mon, 17 Apr 2017 11:32:09 +0100 Subject: [PATCH 1/2] (nuget.commandline) AU udpater closes #681 --- automatic/nuget.commandline/README.md | 3 ++ .../nuget.commandline.nuspec | 27 ++++++++++++ automatic/nuget.commandline/update.ps1 | 42 +++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 automatic/nuget.commandline/README.md create mode 100644 automatic/nuget.commandline/nuget.commandline.nuspec create mode 100644 automatic/nuget.commandline/update.ps1 diff --git a/automatic/nuget.commandline/README.md b/automatic/nuget.commandline/README.md new file mode 100644 index 00000000000..62076a85e94 --- /dev/null +++ b/automatic/nuget.commandline/README.md @@ -0,0 +1,3 @@ +# [nuget.commandline](https://chocolatey.org/packages/nuget.commandline) + +NuGet is the package manager for the Microsoft development platforms including .NET. NuGet gives you access to thousands of packages from other developers on [nuget.org](http://nuget.org), and the NuGet tools let you create, share, and host packages of your own. \ No newline at end of file diff --git a/automatic/nuget.commandline/nuget.commandline.nuspec b/automatic/nuget.commandline/nuget.commandline.nuspec new file mode 100644 index 00000000000..1bfb65319b8 --- /dev/null +++ b/automatic/nuget.commandline/nuget.commandline.nuspec @@ -0,0 +1,27 @@ + + + + + + nuget.commandline + Nuget.CommandLine + 0 + Microsoft + chocolatey, nuget-mirror + NuGet is the package manager for the Microsoft development platforms + NuGet is the package manager for the Microsoft development platforms including .NET. NuGet gives you access to thousands of packages from other developers on [nuget.org](http://nuget.org), and the NuGet tools let you create, share, and host packages of your own. + + https://github.com/NuGet/NuGet.Client + nuget dot.net microsoft foss cross-platform + © .NET Foundation. All rights reserved. + https://raw.githubusercontent.com/NuGet/NuGet.Client/dev/LICENSE.txt + false + https://cdn.rawgit.com/majkinetor/chocolatey/master/nuget.commandline/icon.png + https://docs.microsoft.com/en-us/nuget + https://github.com/NuGet/NuGet.Client + https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/nuget.commandline + + + + + diff --git a/automatic/nuget.commandline/update.ps1 b/automatic/nuget.commandline/update.ps1 new file mode 100644 index 00000000000..999dd2aaf93 --- /dev/null +++ b/automatic/nuget.commandline/update.ps1 @@ -0,0 +1,42 @@ +import-module au +. $PSScriptRoot\..\..\scripts\Set-DescriptionFromReadme.ps1 + +$packageName = 'NuGet.CommandLine' + +function global:au_SearchReplace { + @{ + # Those might be useful for some other nuget packages + + # ".\tools\chocolateyInstall.ps1" = @{ + # "(?i)(^\s*[$]packageName\s*=\s*)('.*')"= "`$1'$packageName'" + # } + # ".\tools\chocolateyUninstall.ps1" = @{ + # "(?i)(^\s*[$]packageName\s*=\s*)('.*')"= "`$1'$packageName'" + # } + } +} + +function global:au_BeforeUpdate { + Get-RemoteFiles -Purge -NoSuffix + + set-alias 7z $Env:chocolateyInstall\tools\7z.exe + rm tools\*.exe + 7z e tools\*.nupkg NuGet.exe -r -otools + rm tools\*.nupkg +} + +function global:au_AfterUpdate { Set-DescriptionFromReadme -SkipFirst 2 } + +function global:au_GetLatest { + $releases = "https://www.nuget.org/packages/$packageName" + $download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing + + $url = $download_page.links | ? title -like '*this version*' | % href + $version = $url -split '/' | select -last 1 + @{ + Version = $version + Url32 = "https://api.nuget.org/packages/$($packageName.ToLower()).${version}.nupkg" + } +} + +update -ChecksumFor none \ No newline at end of file From 414e2f0dbc7b7ff60b8e19a6e86f15f6fc531fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miodrag=20Mili=C4=87?= Date: Mon, 17 Apr 2017 16:54:28 +0200 Subject: [PATCH 2/2] removed garbage chars --- automatic/nuget.commandline/nuget.commandline.nuspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automatic/nuget.commandline/nuget.commandline.nuspec b/automatic/nuget.commandline/nuget.commandline.nuspec index 1bfb65319b8..d3223b49b5d 100644 --- a/automatic/nuget.commandline/nuget.commandline.nuspec +++ b/automatic/nuget.commandline/nuget.commandline.nuspec @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ https://github.com/NuGet/NuGet.Client nuget dot.net microsoft foss cross-platform - © .NET Foundation. All rights reserved. + © .NET Foundation. All rights reserved. https://raw.githubusercontent.com/NuGet/NuGet.Client/dev/LICENSE.txt false https://cdn.rawgit.com/majkinetor/chocolatey/master/nuget.commandline/icon.png