To develop Emulsion, make sure you've installed the following tools:
Build the project using the following shell command:
$ dotnet build
Run the application from sources using the following shell command:
$ dotnet run --project ./Emulsion [optional-path-to-json-config-file]
Execute the tests using the following shell command:
$ dotnet test
If the CI asks you to update the file licenses, follow one of these:
- Update the headers manually (look at the existing files), something like this:
(accommodate to the file's comment style if required).
// SPDX-FileCopyrightText: %year% %your name% <%your contact info, e.g. email%> // // SPDX-License-Identifier: MIT
- Alternately, use [REUSE][reuse] tool:
$ reuse annotate --license MIT --copyright '%your name% <%your contact info, e.g. email%>' %file names to annotate%
(Feel free to attribute the changes to "Emulsion contributors https://github.com/codingteam/emulsion" instead of your name in a multi-author file, or if you don't want your name to be mentioned in the project's source: this doesn't mean you'll lose the copyright.)
To build and push the container to Docker Hub, use the following shell commands:
$ docker build -t codingteam/emulsion:$EMULSION_VERSION \
-t codingteam/emulsion:latest .
$ docker login # if necessary
$ docker push codingteam/emulsion:$EMULSION_VERSION
$ docker push codingteam/emulsion:latest
where $EMULSION_VERSION
is the version of the image to publish.
If you want to update a database structure, you'll need to create a migration.
This article explains how to create a database migration using EFCore.FSharp.
-
Change the entity type (see
Emulsion.Database/Entities.fs
), update theEmulsionDbContext
if required. -
Run the following shell commands:
$ dotnet tool restore $ cd Emulsion.Database $ dotnet ef migrations add <migration-name>
[nvm-windows]