Issue #65 - Add NuGet packaging (#161)

* NuGet: Add simple NuGet packaging PoC

* Fix the version definition

* Run PS instead of CMD

* Fix the .NET4 binary reference in the spec

* Publish the NuGet package directly to the root

* Covert ID to uppercase just to follow the common notation

* Use a fixed artifact name to enable the deployment

* NuGet does not support multi-line paragraphs

* Add the NuGet badge
pull/166/head
Oleg Nenashev 2016-12-11 20:11:16 +01:00 committed by GitHub
parent 98f32e1b51
commit c55d33b046
3 changed files with 37 additions and 0 deletions

View File

@ -2,6 +2,7 @@ winsw: Windows service wrapper in less restrictive license
=========================
[![Build status](https://ci.appveyor.com/api/projects/status/i94752yal9iy77in?svg=true)](https://ci.appveyor.com/project/oleg-nenashev/winsw)
[![NuGet](https://img.shields.io/nuget/v/WinSW.svg)](https://www.nuget.org/packages/WinSW/)
WinSW is an executable binary, which can be used to wrap and manage a custom process as a Windows service.
Once you download the installation package, you can rename `winsw.exe` to any name, e.g. `myService.exe`.

31
WinSW.nuspec Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>WinSW</id>
<version>$version$</version>
<title>Windows Service Wrapper</title>
<summary>WinSW is a binary, which can be used to wrap and manage custom executables as Windows services.</summary>
<description>
Windows Service Wrapper (WinSW) is a binary, which can be used to wrap and manage custom executables as Windows services. The project has a MIT License, hence it can be used just as a binary even in commercial systems. Currently the distributable includes binaries targeting .NET Frameworks 2.0 and 4.0.
WinSW provides a CL for installation and management of Windows services. It also offers many advanced options, which can be configured via additional XML file. Several examples: logging of spawned executables with log rotation, automated update of files from URL, runaway process termination, shared directory mapping on startup, etc.
More info about the wrapper is available in the projects GitHub repository.
</description>
<authors>WinSW contributors</authors>
<owners>Oleg Nenashev, Kohsuke Kawaguchi</owners>
<licenseUrl>https://github.com/kohsuke/winsw/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/kohsuke/winsw</projectUrl>
<!--<iconUrl>TODO</iconUrl>-->
<copyright>Copyright (c) 2010-2016 Kohsuke Kawaguchi, Sun Microsystems, Inc., CloudBees, Inc., Oleg Nenashev and other contributors</copyright>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>service wrapper</tags>
<dependencies>
<!-- No explicit dependencies, everything is bundled via ILMerge -->
</dependencies>
</metadata>
<files>
<file src="src\Core\ServiceWrapper\bin\Release\WinSW.NET2.exe" target="lib\net20-full" />
<file src="src\Core\ServiceWrapper_dotNET4\bin\Release\WinSW.NET4.exe" target="lib\net40-full" />
</files>
</package>

View File

@ -31,6 +31,9 @@ build:
parallel: true
project: src\winsw.sln
after_build:
- ps: nuget pack WinSW.nuspec -Version $env:APPVEYOR_BUILD_VERSION
test_script:
# Runner for NUnit2
- ps: nunit-console 'src/Test/winswTests/bin/Release/winswTests.dll' 'src/Test/winswTests/bin/Release/SharedDirectoryMapper.dll' 'src/Test/winswTests/bin/Release/RunawayProcessKiller.dll'
@ -40,6 +43,8 @@ artifacts:
name: WinSW.NET2.exe
- path: 'src/Core/ServiceWrapper_dotNET4/bin/Release/WinSW.NET4.exe'
name: WinSW.NET4.exe
- path: 'WinSW.$(appveyor_build_version).nupkg'
name: WinSW.nupkg