Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jefersonsv/nuspecfromgithub

Utility to create .nuspec file from github and project assembly
https://github.com/jefersonsv/nuspecfromgithub

assembly csproj github nuget nuspec

Last synced: 10 days ago
JSON representation

Utility to create .nuspec file from github and project assembly

Awesome Lists containing this project

README

        

# NuspecFromGithub
Utility to create .nuspec file from github and project assembly

# Usage
```bash
-p, --project... Specify the project path file

-f, --force[optional]... Force recreate file

-g, --github... Specify the username/repository of github
```

# Features

* Create nuspec file automatically
* Access github API to get attributes: id, title, authors, owners, license, project url, description, commit notes and tags
* Get version file of AssemblyInfo.cs by regex

# How to run

Get binary file on github releases, chocolatey or adding nuget reference and execute:

```bash
NuspecFromGithub.exe -p ..\..\ --force -g jefersonsv/NuspecFromGithub
```

NuspecFromGithub

## From github releases
Get the realease on: https://github.com/jefersonsv/NuspecFromGithub/releases/tag/1.0.0

## From chocolatey
```bash
choco install NuspecFromGithub
```

## Adding nuget reference
```bash
PM> Install-Package NuspecFromGithub
```

# Result

This command will generate the **NuspecFromGithub.nuspec** in same folder of .csproj file with content

```xml


NuspecFromGithub
1.0.0.0
Utility to create .nuspec file from github and project assembly
Jeferson Tenorio
Jeferson Tenorio
http://choosealicense.com/licenses/mit/
https://github.com/jefersonsv/NuspecFromGithub

false
Utility to create .nuspec file from github and project assembly
implementation
Copyright 2017

```

After file created, on same folder of .csproj file run below command to create .nupkg:
* For NuGet Version: 4.3.0.4406

Set your nuget ApiKey before below steps running the command (it's necessary only first time):
```bash
nuget.exe setApiKey
```

To put your package to Nuget execute:

```bash
nuget pack NuspecFromGithub.nuspec -IncludeReferencedProjects
nuget push .nupkg -Source https://www.nuget.org/api/v2/package
```

The command setApi it's option if the key has been configureted previous

# Tips
* https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package
* https://blog.codeinside.eu/2017/02/13/create-nuget-packages-with-cake/
* https://docs.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference

# Thanks

* https://github.com/j-maly/CommandLineParser