This is a step-by-step guide describing the process of bootstrapping a brand new Vostok library.
-
If not already, read the development conventions for ordinary libraries and source libraries. Most of the requirements described in there are automated by Launchpad templates, but it's essential to know what's going on.
-
Create a new repository in Vostok organization on GitHub. Note that repository name should not start with
vostokprefix (it comes from organization name). -
Create an empty
masterbranch in new repository on github -
Select a name for Cement module. It should be in lowercase and start with a common
vostokprefix (likevostok.logging.abstractions). -
Create a Cement module with following command:
cm module add <module-name> <https-repo-url> --pushurl=<ssh-repo-url> --package=vostok. Here<https-repo-url>refers to a repository URL like https://github.com/vostok/devtools.git and<ssh-repo-url>is like git@github.com:vostok/devtools.git -
Fetch the Cement module:
cm get <module-name> -
Move to the module directory:
cd <module-name> -
Install or update Launchpad to latest version.
-
Bootstrap repository contents with one of the following launchpad templates:
launchpad new vostok-libraryfor ordinary librarieslaunchpad new vostok-source-libraryfor source libraries- You will be prompted for multiple variables. Follow the provided descriptions to choose correct values.
-
Manually fix
.github/workflows/ci.ymlfile: last line should betoken: ${{ secrets.NUGET_TOKEN }}(or fix launchpad temlate, but I don't know how to escape it) -
Update cement dependencies:
cm update-deps <module-name> -
Ensure that created project builds with a
dotnet buildcommand -
Setup CI on GitHub:
- Copy and workflow from hosting module
- Check and fill testing frameworks & platforms
-
Push repository to
masterbranch.