Compare commits

..

14 Commits

Author SHA1 Message Date
Dawid Bepierszcz
86e3f69989 Fixed migrations 2025-10-17 01:52:43 +02:00
Dawid Bepierszcz
4d19ac4d77 Delete CS2-SimpleAdmin/Database/Migration.cs 2025-10-17 01:50:52 +02:00
Dawid Bepierszcz
503d2f63c3 Fixed migrations 2025-10-17 01:50:22 +02:00
Dawid Bepierszcz
cb1bf60060 Delete CS2-SimpleAdmin/Database/Migrations/Mysql directory 2025-10-17 01:49:31 +02:00
Dawid Bepierszcz
3a57371be9 Updated StatusBlocker 2025-10-16 03:04:13 +02:00
Dawid Bepierszcz
63ca44bb78 Delete Modules/CS2-SimpleAdmin_StealthModule/METAMOD PLUGIN/StatusBlocker-v1.0.3-linux.tar.gz 2025-10-16 03:03:48 +02:00
Dawid Bepierszcz
3270403ea1 Delete Modules/CS2-SimpleAdmin_StealthModule/METAMOD PLUGIN/StatusBlocker-v1.0.3-windows.tar.gz 2025-10-16 03:03:40 +02:00
Dawid Bepierszcz
2edacc2b3f Merge branch 'main' of https://github.com/daffyyyy/CS2-SimpleAdmin 2025-10-03 12:10:52 +02:00
Dawid Bepierszcz
e1e66441f2 Remove custom ClearBuildFiles target and cleanup csproj
Commented out the GenerateDependencyFile property and removed the ClearBuildFiles target from the project file. Also reformatted and cleaned up the ItemGroup for migration scripts, improving maintainability.
2025-10-03 12:10:50 +02:00
Dawid Bepierszcz
cc54b9e879 Update README.md 2025-10-03 02:35:45 +02:00
Dawid Bepierszcz
640e618f3b Update README.md 2025-10-03 02:34:03 +02:00
Dawid Bepierszcz
23d174c4a5 Update build.yml 2025-10-03 02:26:07 +02:00
Dawid Bepierszcz
b7371adf26 Update build.yml 2025-10-03 02:23:07 +02:00
Dawid Bepierszcz
9154748ce6 Update build.yml 2025-10-03 02:19:05 +02:00
14 changed files with 245 additions and 246 deletions

View File

@@ -59,7 +59,7 @@ jobs:
cp -r ${{ env.TMP_PATH }}/${{ env.PROJECT_NAME_CS2_SIMPLEADMINAPI }}/* ${{ env.OUTPUT_PATH }}/shared/CS2-SimpleAdminApi/ cp -r ${{ env.TMP_PATH }}/${{ env.PROJECT_NAME_CS2_SIMPLEADMINAPI }}/* ${{ env.OUTPUT_PATH }}/shared/CS2-SimpleAdminApi/
- name: Zip Main Build Output - name: Zip Main Build Output
run: zip -r CS2-SimpleAdmin${{ steps.get_version.outputs.VERSION }}.zip ${{ env.OUTPUT_PATH }} run: zip -r CS2-SimpleAdmin-${{ steps.get_version.outputs.VERSION }}.zip ${{ env.OUTPUT_PATH }}
- name: Extract & Zip StatusBlocker Linux - name: Extract & Zip StatusBlocker Linux
run: | run: |
@@ -80,7 +80,7 @@ jobs:
with: with:
name: CS2-SimpleAdmin-Build-Artifacts name: CS2-SimpleAdmin-Build-Artifacts
path: | path: |
CS2-SimpleAdmin${{ steps.get_version.outputs.VERSION }}.zip CS2-SimpleAdmin-${{ steps.get_version.outputs.VERSION }}.zip
StatusBlocker-linux-${{ steps.get_version.outputs.VERSION }}.zip StatusBlocker-linux-${{ steps.get_version.outputs.VERSION }}.zip
StatusBlocker-windows-${{ steps.get_version.outputs.VERSION }}.zip StatusBlocker-windows-${{ steps.get_version.outputs.VERSION }}.zip
@@ -97,7 +97,7 @@ jobs:
name: CS2-SimpleAdmin-Build-Artifacts name: CS2-SimpleAdmin-Build-Artifacts
path: . path: .
- name: Unzip main build artifact - name: Unzip main build artifact
run: unzip CS2-SimpleAdmin${{ needs.build.outputs.build_version }}.zip -d ./counterstrikesharp run: unzip CS2-SimpleAdmin-${{ needs.build.outputs.build_version }}.zip -d ./counterstrikesharp
- name: Publish combined release - name: Publish combined release
uses: ncipollo/release-action@v1.14.0 uses: ncipollo/release-action@v1.14.0
with: with:

View File

@@ -15,7 +15,7 @@
<DebugSymbols>false</DebugSymbols> <DebugSymbols>false</DebugSymbols>
<PublishTrimmed>true</PublishTrimmed> <PublishTrimmed>true</PublishTrimmed>
<DebuggerSupport>false</DebuggerSupport> <DebuggerSupport>false</DebuggerSupport>
<GenerateDependencyFile>false</GenerateDependencyFile> <!-- <GenerateDependencyFile>false</GenerateDependencyFile>-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -34,18 +34,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\CS2-SimpleAdminApi\CS2-SimpleAdminApi.csproj" /> <ProjectReference Include="..\CS2-SimpleAdminApi\CS2-SimpleAdminApi.csproj" />
</ItemGroup> </ItemGroup>
<Target Name="ClearBuildFiles" AfterTargets="PostBuildEvent">
<ItemGroup>
<FilesToDelete Include="$(OutDir)Tomlyn.dll" />
<FilesToDelete Include="$(OutDir)Serilog*.dll" />
<FilesToDelete Include="$(OutDir)CS2-SimpleAdminApi.*" />
<FilesToDelete Include="$(OutDir)McMaster*" />
<FilesToDelete Include="$(OutDir)Scrutor.dll" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
</Target>
<ItemGroup> <ItemGroup>
<None Update="lang\**\*.*" CopyToOutputDirectory="PreserveNewest" /> <None Update="lang\**\*.*" CopyToOutputDirectory="PreserveNewest" />
<None Update="Database\Migrations\Mysql\001_CreateTables.sql"> <None Update="Database\Migrations\Mysql\001_CreateTables.sql">

View File

@@ -17,8 +17,9 @@ public class Migration(string migrationsPath)
if (files.Count == 0) return; if (files.Count == 0) return;
await using var connection = await CS2_SimpleAdmin.DatabaseProvider.CreateConnectionAsync(); await using var connection = await CS2_SimpleAdmin.DatabaseProvider.CreateConnectionAsync();
await using (var cmd = connection.CreateCommand()) await using (var cmd = connection.CreateCommand())
{
if (migrationsPath.Contains("sqlite", StringComparison.CurrentCultureIgnoreCase))
{ {
cmd.CommandText = """ cmd.CommandText = """
CREATE TABLE IF NOT EXISTS sa_migrations ( CREATE TABLE IF NOT EXISTS sa_migrations (
@@ -27,6 +28,16 @@ public class Migration(string migrationsPath)
); );
"""; """;
}
else
{
cmd.CommandText = """
CREATE TABLE IF NOT EXISTS sa_migrations (
id INT PRIMARY KEY AUTO_INCREMENT,
version VARCHAR(128) NOT NULL
);
""";
}
await cmd.ExecuteNonQueryAsync(); await cmd.ExecuteNonQueryAsync();
} }

View File

@@ -36,6 +36,7 @@ CREATE TABLE IF NOT EXISTS `sa_admins` (
`flags` TEXT NULL, `flags` TEXT NULL,
`immunity` int(11) NOT NULL DEFAULT 0, `immunity` int(11) NOT NULL DEFAULT 0,
`server_id` INT NULL, `server_id` INT NULL,
`ends` timestamp NULL, `ends` timestamp NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)

View File

@@ -20,7 +20,6 @@ CREATE TABLE IF NOT EXISTS `sa_groups_servers` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `sa_admins` ADD `group_id` INT NULL AFTER `created`; ALTER TABLE `sa_admins` ADD `group_id` INT NULL AFTER `created`;
ALTER TABLE `sa_groups_flags` ADD FOREIGN KEY (`group_id`) REFERENCES `sa_groups`(`id`) ON DELETE CASCADE; ALTER TABLE `sa_groups_flags` ADD FOREIGN KEY (`group_id`) REFERENCES `sa_groups`(`id`) ON DELETE CASCADE;
ALTER TABLE `sa_groups_servers` ADD FOREIGN KEY (`group_id`) REFERENCES `sa_groups`(`id`) ON DELETE CASCADE; ALTER TABLE `sa_groups_servers` ADD FOREIGN KEY (`group_id`) REFERENCES `sa_groups`(`id`) ON DELETE CASCADE;
ALTER TABLE `sa_admins` ADD FOREIGN KEY (`group_id`) REFERENCES `sa_groups`(`id`) ON DELETE SET NULL; ALTER TABLE `sa_admins` ADD FOREIGN KEY (`group_id`) REFERENCES `sa_groups`(`id`) ON DELETE SET NULL;

View File

@@ -8,8 +8,8 @@
<img src="https://img.shields.io/badge/Made_with-a_lot_of_tea_%F0%9F%8D%B5-red" alt="Made with a lot of tea 🍵" /> <img src="https://img.shields.io/badge/Made_with-a_lot_of_tea_%F0%9F%8D%B5-red" alt="Made with a lot of tea 🍵" />
</p> </p>
# [![Join the support Discord](https://img.shields.io/badge/Discord-Support-blue?logo=discord&logoColor=white)](https://discord.com/channels/1160907911501991946/1180627186865156126) [![Join the support Discord](https://img.shields.io/badge/Discord-Support-blue?logo=discord&logoColor=white)](https://discord.com/channels/1160907911501991946/1180627186865156126)
CS2-SimpleAdmin # CS2-SimpleAdmin
--- ---
@@ -103,4 +103,4 @@ If you find CS2-SimpleAdmin useful, consider supporting the ongoing development:
--- ---
## 📄 License ## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. This project is licensed under the GPL-3.0 license - see the [LICENSE](LICENSE) file for details.