Development Requirements
For local development, please make sure that your system meets the following requirements:
- .NET 8 (or later) SDK
- A supported version of Windows, Linux, or macOS (Linux is recommended)
- Entity Framework Core Tools
- 512 MB of available RAM
- Network or localhost connection to a non-production copy of Sharkey's PostgreSQL database, and a user with read/write/DDL permissions
- [recommended] a .NET IDE such as Microsoft Visual Studio or JetBrains Rider
- [recommended] Microsoft PowerShell to execute resource scripts
- [optional] A non-production installation of Sharkey
- [optional] Network or localhost connection to Sharkey's backend API
Development Setup
- Fork the ModShark repository.
- Clone your personal fork:
git clone https://github.com/$your_username/ModShark
. - Create
appsettings.Local.json
and populate according to the instructions in the readme. Make sure to use a non-production database / instance! - Apply database migrations:
dotnet ef database update --project SharkeyDB --startup-project ModShark
. - Open the solution in your editor of choice.
dotnet ef migrations remove --project SharkeyDB --startup-project ModShark
Create migrations bundle
This will produce a SQL file that deploys all missing migrations. Set or replace $migrations_file
with the path to save the SQL file.
dotnet ef migrations script --idempotent --project SharkeyDB --startup-project ModShark --output $migrations_file
Publishing
Produce a release package
This will produce a distributable ZIP archive in /Release
. Binaries and migrations are included. Please ensure that PowerShell is installed, and make sure to set the ReleaseVersion correctly in /Resources/build-prod.ps1
.
powershell ./Resources/build-prod.ps1