HDFGroup / HDF.PInvoke

Raw HDF5 Power for .NET
http://www.hdfgroup.org/HDF5
Other
80 stars 29 forks source link

Automatic NuGet package generation #106

Closed JanWosnitza closed 7 years ago

JanWosnitza commented 7 years ago

This PR contains #105 and #74.

Usage

To build the project simply run build.cmd. This will build the latest version (upper most entry in RELEASE_NOTES.md). It's possible to specify a specific version (1.8 or 1.10): build.cmd ver=1.8 or build.cmd ver=1.10.

build.cmd CMD ver=VER:

CMD Description
Build Builds the solution (using MSBuild)
Test Executes the UnitTests (using MSTest). This is the default command.
GenTemplate Generates the template file required by Paket to generate the NuGet-package (paket.template)
NuGet Pack the NuGet-package (temp/HDF.PInvoke.VERSION.nupkg)
Deploy Push the NuGet-package to the NuGet server

Deploy is not untested.

"Explanation"

All of this is specified within build.fsx. An .fsx file is an F#-Script file. It will be executed by Fake.exe when calling build.cmd. Since Fake isn't part of the repository Paket will download it. This is pretty much the recommended way.

Examples

build.cmd Test ver=1.10
build.cmd NuGet ver=1.8

UPDATE

Renamed RunTests to Test so it is shorter and is more similar to the other commands.

gheber commented 7 years ago

Thanks for all the hard work! I'll check this out tomorrow. (It's MLK Day here)

JanWosnitza commented 7 years ago

I tried to keep the changeset small.

But I think it would be good to split 1.8 and 1.10 into 2 projects like this:

So the 2 library versions can be built and tested simultaneously.

gheber commented 7 years ago
  1. Never put # in a path name.
  2. "Platform", "Any CPU" missing in build.fsx
  3. Missing TestResults directory
JanWosnitza commented 7 years ago
  1. created #107
  2. added
  3. fixed
gheber commented 7 years ago

Outstanding work! I'm sorry that it took so long. I just built the 1.8.18 native binaries and will use this new mechanism to roll the 1.8.18 NuG(g)ets.