added build structure

This commit is contained in:
Ell 2021-08-04 05:42:02 +02:00
parent c9f314f29f
commit 3e24b7669c
5 changed files with 41 additions and 6 deletions

12
.config/dotnet-tools.json Normal file
View file

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "1.1.0",
"commands": [
"dotnet-cake"
]
}
}
}

6
.gitignore vendored
View file

@ -1,10 +1,8 @@
###############
# folder #
###############
/**/DROP/ /**/DROP/
/**/TEMP/ /**/TEMP/
/**/packages/ /**/packages/
/**/bin/ /**/bin/
/**/obj/ /**/obj/
_site _site
api api
tools

15
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,15 @@
pipeline {
agent any
stages {
stage('Document') {
when {
branch 'release'
}
steps {
sh 'dotnet tool restore'
sh 'dotnet cake'
sh 'cp _site/** /var/www/tinylifedocs/ -r'
}
}
}
}

View file

@ -4,7 +4,7 @@ This page sums up a few of the basics that you'll need to know if you want to ma
## Creating mods ## Creating mods
To create a mod, all you have to do is create a repository [from this template](https://github.com/Ellpeck/TinyLifeExampleMod/generate) and open the project contained in it using Visual Studio, Rider or any other kind of C# IDE. The code that is already there contains some examples. Once you're done checking them out, you can just delete them and start fresh. To create a mod, all you have to do is create a repository [from this template](https://github.com/Ellpeck/TinyLifeExampleMod/generate) and open the project contained in it using Visual Studio, Rider or any other kind of C# IDE. The code that is already there contains some examples. Once you're done checking them out, you can just delete them and start fresh.
This repository also contains a little `Run` script for [windows](./Run.bat) and [linux and mac](./Run.sh) that automatically builds your mod, copies it into the `Mods` directory of your Tiny Life instance and runs the game. Note that the script will only work correctly if you've previously launched Tiny Life manually. The template repository also contains a little `Run` script for [windows](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/Run.bat) and [linux and mac](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/Run.sh) that automatically builds your mod, copies it into the `Mods` directory of your Tiny Life instance and runs the game. Note that the script will only work correctly if you've previously launched Tiny Life manually.
The game's API is **fully documented**. The documentation is easily accessible by opening any of the API's files in your IDE. The most updated version can be found on [the wiki](https://github.com/Ellpeck/TinyLifeExampleMod/wiki) as well. The game's API is **fully documented**. The documentation is easily accessible by opening any of the API's files in your IDE. The most updated version can be found on [the wiki](https://github.com/Ellpeck/TinyLifeExampleMod/wiki) as well.
@ -22,4 +22,4 @@ The NuGet package for the Tiny Life API just contains a [reference assembly](htt
Technically, you can [download the game](https://tinylifegame.com/) and then decompile it to see the implementation's code, but due to its license, copying it is not allowed. Technically, you can [download the game](https://tinylifegame.com/) and then decompile it to see the implementation's code, but due to its license, copying it is not allowed.
## Dependency version history ## Dependency version history
Since the mod is compiled against the same dependencies as Tiny Life, it also needs to have the same versions of those dependencies for mods to work correctly with the game. Each update to this repository is [tagged](https://github.com/Ellpeck/TinyLifeExampleMod/tags) with the game's version number. If you want to develop for a certain version, just check that tag's [project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) to see the required dependency versions. Since the mod is compiled against the same dependencies as Tiny Life, it also needs to have the same versions of those dependencies for mods to work correctly with the game. Each update to the template repository is [tagged](https://github.com/Ellpeck/TinyLifeExampleMod/tags) with the game's version number. If you want to develop for a certain version, just check that tag's [project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) to see the required dependency versions.

10
build.cake Normal file
View file

@ -0,0 +1,10 @@
#addin Cake.DocFx&version=1.0.0
#tool docfx.console&version=2.51.0
var target = Argument("target", "Document");
Task("Document").Does(() => {
var path = "docfx.json";
DocFxMetadata(path);
DocFxBuild(path);
});
RunTarget(target);