Skip to content

Build And Release

samatrhea edited this page Feb 19, 2023 · 13 revisions

Development Environment

The SysML2.NET project is developed using Visual Studio 2022.

The following tools are used by the RHEA development team:

Build

The SysML2.NET solution contains two build configurations:

  • debug: used while developing new features
  • release: used to create a build for release

Release

Follow these steps to create pre-release nugets using the Debug configuration or a release nugets using the Release configuration:

  1. Run all unit tests and verify that they pass
  2. Make sure the version numbers of the projects are incremented when things have changed; the project makes use of SEMVER.
  3. Update the in the .csproj files; this will be visible on https://nuget.org
  4. Via the GitHub web-ui draft a new release referencing the tag and set the release title to Version MAJOR.MINOR.PATCH. The description of the release shall mention the updates referencing the GitHub issue numbers.

NOTE: The .csproj files contain settings that indicate that a symbols package is created as well. When using dotnet push to publish the packages on https://nuget.org, the symbols packages will be pushed as well.

pre-release

First clean the solution and then pack. The pack command will build and create the nugets. The --version-suffix parameter is used to add a suffix such as rc01.

dotnet clean -c Debug
dotnet pack --version-suffix "rcxy" -c Debug

In case you want to push the new nugets to https://nuget.org use the following command. You will require an API Key. This needs to be repeated for each nuget that needs to be published.

dotnet push SysML2.NET.MAJOR.MINOR.PATCH-rcxy.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey "your-api-key"
dotnet push SysML2.NET.Serializer.Json.MAJOR.MINOR.PATCH-rcxy.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey "your-api-key"
dotnet push SysML2.NET.Serializer.Dictionary.MAJOR.MINOR.PATCH-rcxy.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey "your-api-key"
dotnet push SysML2.NET.REST.MAJOR.MINOR.PATCH-rcxy.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey "your-api-key"

release

SDK

First clean the solution and then pack. The pack command will build and create the nugets. The --include-source parameter is used to add the symbols and the source code to a specific symbols nuget. The symbols nuget will automatically be pushed to https://nuget.smbsrc.net.

dotnet clean -c Release SysML2.NET.sln
dotnet pack --include-source -c Release SysML2.NET.sln -o .

In case you want to push the new nugets to https://nuget.org use the following command. You will require an API Key. This needs to be repeated for each nuget that needs to be published.

dotnet nuget push SysML2.NET.MAJOR.MINOR.PATCH.nupkg -s https://api.nuget.org/v3/index.json -k "your-api-key"
dotnet nuget push SysML2.NET.Serializer.Json.MAJOR.MINOR.PATCH.nupkg -s https://api.nuget.org/v3/index.json -k "your-api-key"
dotnet nuget push SysML2.NET.Serializer.Dictionary.MAJOR.MINOR.PATCH.nupkg -s https://api.nuget.org/v3/index.json -k "your-api-key"
dotnet nuget push SysML2.Dal.MAJOR.MINOR.PATCH.nupkg -s https://api.nuget.org/v3/index.json -k "your-api-key"
dotnet nuget push SysML2.NET.REST.MAJOR.MINOR.PATCH.nupkg -s https://api.nuget.org/v3/index.json -k "your-api-key"

Web Application

DOCKER_BUILDKIT=1 docker build -f SysML2.NET.Viewer/Dockerfile -t rheagroup/sysml2.net.viewer:latest -t rheagroup/sysml2.net.viewer:x.y.z .

docker run -p 8080:80 --name sysml2-viewer rheagroup/sysml2.net.viewer:latest

docker push rheagroup/sysml2.net.viewer:latest
docker push rheagroup/sysml2.net.viewer:x.y.z

HTML docs

docker build -f HtmlDocs/Dockerfile -t rheagroup/sysml2.net.docs:latest -t rheagroup/sysml2.net.docs:x.y.z .
docker run -p 8080:80 --name sysml2.net.docs rheagroup/sysml2.net.docs:latest

docker push rheagroup/sysml2.net.docs:latest
docker push rheagroup/sysml2.net.docs:x.y.z
Clone this wiki locally