added publishing scripts to the example mod

This commit is contained in:
Ell 2021-11-09 02:25:33 +01:00
parent 54f3646d24
commit 4af436681d
2 changed files with 22 additions and 0 deletions

11
Publish.bat Normal file
View file

@ -0,0 +1,11 @@
@echo off
rem move to the script directory
cd /d "%~dp0"
rem build the mod
dotnet build
rem zip the mod
cd ./bin/Debug/net5.0
for /F %%p in ('dir /b "*.dll"') do (set file=%%p)
set dest=%file:~0,-4%.zip
tar -cf ../%dest% --exclude ref --exclude *.pdb --exclude *.deps.json *
echo Published to bin/Debug/%dest%

11
Publish.sh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/bash
# move to the script directory
cd "$(dirname "$0")"
# build the mod
dotnet build
# zip the mod
cd ./bin/Debug/net5.0
file=$(find *.dll -printf %f)
dest=${file::-4}.zip
tar -cf ../$dest --exclude ref --exclude *.pdb --exclude *.deps.json *
echo Published to bin/Debug/$dest