Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Latest commit

 

History

History
136 lines (93 loc) · 2.8 KB

File metadata and controls

136 lines (93 loc) · 2.8 KB

Distributing NuGets

Common steps

1. Pre-requisite

  • register to NuGet central repo and generate your api key. Be sure copy them somewhere, since they won’t be visualized anymore

  • NuGets for the SDK starts with AeroGear.Mobile, if you want to release, you should be added to the list of owners (ask existing owner to add you)

2. Build the project for the desired platform

  • open VisualStudio, open solution

  • choose Release on the top bar schema selection select CoreXXX where XXX is iOS or Android

  • build the solution / individual project

3. Set-up your NuGet API key

  • Make sure nuget.exe is installed and on the PATH. Download From here

  • Add your keys by running (only the first time):

nuget setApiKey <api key>

There is a release_sdk.js script in the scripts directory.

1. Preparation

In the SDK base directory do:

cd scripts
npm install

2. Bump .nuspec versions of SDK projects

Bump script automatically updates patch part of the version of the project’s nuspec.

Bump versions for all projects:

./release_sdk.js bump all --write

Bump versions for one specific project:

./release_sdk.js bump AeroGear.Mobile.Core --write

Bumping major or minor version

Example: If the version is 1.1.23.

./release_sdk.js bump AeroGear.Mobile.Auth minor --write

The version will be changed to 1.2.0

./release_sdk.js bump AeroGear.Mobile.Auth major --write

The version will be changed to 2.0.0

Omit --write parameter to try it without writing any changes.

3. Pack NuGet(s)

You need to build the released project (or all projects) in Release build type before doing that.

Pack all project’s NuGets

./release_sdk.js pack all

Pack specific project’s NuGet

./release_sdk.js pack AeroGear.Mobile.Core

4. Publish NuGet(s) to the public repository

Push all project’s NuGets

./release_sdk.js push all

Push specific project’s NuGet

./release_sdk.js push AeroGear.Mobile.Core

Distributing manually

There is example for releasing Core project. Same goes for others.

1. Bump version in Core/Core.nuspec

2. Update dependencies

  • check if you added something that you need to use in the library and add dependency to it

3. Push to NuGet

After updating the nuspec with the right version you can pack the release and upload:

nuget pack Core.nuspec -Symbols
nuget push AeroGear.Mobile.Core.<version>.nupkg -Source https://api.nuget.org/v3/index.json