Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick #10778 into 2.7 #10804

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions tools/NuGet/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
## About ##
# About

This folder contains scripts to build and publish the DynamoVisualProgramming NuGet packages into NuGet Gallery and Autodesk Artifactory.

## Instructions ##
## Instructions

To build NuGet packages locally, run BuildPackages.bat with parameters.

```
```bash
.\BuildPackages.bat param1 param2(optional)
```

param1 should be where the nuspec path
*param1* should be the path where the nuspec files exist

param2 should be where the dynamo binaries path(optional, if it is not provided, it falls back to the `harvest` folder assuming dev has run the Install.sln)
*param2* should be the path where the dynamo binaries exist(optional, if it is not provided, it falls back to the `harvest` folder assuming dev has run the Install.sln)

see example
See Example:

```bash
.\BuildPackages.bat "template-artifactory" "...\GitHub\Dynamo\src\DynamoInstall\harvest"
```
.\BuildPackages.bat 'template-artifactory' '...\GitHub\Dynamo\src\DynamoInstall\harvest'
```

> Note: To build Install.sln solution you will need wix installed.

This command will wrap the dlls in the `harvest` folder into `nupkg` files and put them in current folder.

To post them as pre-release packages into NuGet Gallery and Artifactory, skip the above step and run BuildAndPostPackages.bat.
Supply the NuGet Gallery API Key as the first parameter and the Artifactory API Key as the second parameter for this batch file.
Alternatively, you can provide the second parameter as the path to your Dynamo binaries built with Release configuration, such as:

```bash
.\BuildPackages.bat "template-artifactory" "...\GitHub\Dynamo\bin\AnyCPU\Release"
```
The version is parameterized in the nuspec file and the parameter is set to the version number obtained in the `BuildPackages.bat` file. This is done using a `-properties` option while using the `nuget pack` command. The nuspecs from the original folders namely, `template-nuget` and `template-artifactory`. These are passed as command line arguments (which is what the %1 is) while invoking the `BuildPackages.bat` script from the `PostNuGetPackages.bat` and the `PostArtifactoryPackages.bat` files respectively.

To post them as pre-release packages into NuGet Gallery and Artifactory, skip the above step and run PostNugetPackages.bat or PostArtifactoryPackages.bat.
Supply the NuGet Gallery API Key as the first parameter and the Artifactory API Key as the second parameter for this batch file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<metadata>
<id>DynamoVisualProgramming.Core</id>
<version>$Version$</version>
<authors>Autodesk</authors>
Expand All @@ -27,6 +27,7 @@
<dependency id="NUnit" version="2.6.3"/>
<dependency id="DynamoVisualProgramming.ZeroTouchLibrary" version="$Version$"/>
<dependency id="Newtonsoft.Json" version="8.0.3"/>
<dependency id="System.Collections.Immutable" version="1.7.1"/>
</group>
</dependencies>
</metadata>
Expand Down