mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-07-08 18:06:08 +00:00
Add dotnet-tarball command, AppVeyor script
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bin/
|
||||
obj/
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Frederik Carlier and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Packaging utilities for .NET Core
|
||||
|
||||
This repository contains command-line extensions for the .NET Core CLI which make it easy to create
|
||||
deployment packages (such as `.zip` files, tarballs or installers) for .NET Core applications.
|
||||
|
||||
The goal is to implement the following commands:
|
||||
|
||||
* `dotnet tarball` - Create a `.zip` file (for Windows) and a `.tar.gz` file for Linux and OS X
|
||||
* `dotnet choco` - Create a Chocolatey package
|
||||
* `dotnet msi` - Create a Windows Installer (msi) package
|
||||
* `dotnet deb` - Create a Ubuntu/Debian installer
|
||||
* `dotnet pkg` - Create a macOS installer
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
Add the following entry to your `.csproj` file:
|
||||
|
||||
```xml
|
||||
|
||||
<DotNetCliToolReference Include="dotnet-tarball">
|
||||
|
||||
<Version>0.1-*</Version>
|
||||
|
||||
</DotNetCliToolReference>
|
||||
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Run `dotnet tarball`
|
||||
20
appveyor.yml
Normal file
20
appveyor.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
version: '0.1.{build}'
|
||||
|
||||
before_build:
|
||||
- choco install -y wget
|
||||
- wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-win-x64.latest.exe -O dotnet-dev-win-x64.latest.exe
|
||||
- dotnet-dev-win-x64.latest.exe /install /quiet /log dotnet_install.txt
|
||||
- ps: Push-AppVeyorArtifact dotnet_install.txt
|
||||
- dotnet --version
|
||||
- dotnet restore dotnet-tarball\dotnet-tarball.csproj
|
||||
|
||||
build_script:
|
||||
- dotnet build dotnet-tarball\dotnet-tarball.csproj -c Release
|
||||
- dotnet pack dotnet-tarball\dotnet-tarball.csproj -c Release --version-suffix r%APPVEYOR_BUILD_NUMBER%
|
||||
|
||||
on_success:
|
||||
- ps: Push-AppVeyorArtifact dotnet-tarball\bin\Release\dotnet-tarball.1.0.0-r$($env:APPVEYOR_BUILD_NUMBER).nupkg
|
||||
|
||||
nuget:
|
||||
project_feed: true
|
||||
account_feed: true
|
||||
9
dotnet-tarball/Program.cs
Normal file
9
dotnet-tarball/Program.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
8
dotnet-tarball/dotnet-tarball.csproj
Normal file
8
dotnet-tarball/dotnet-tarball.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
<VersionPrefix>0.1.0-preview</VersionPrefix>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user