From b29a79ac2da2121d75403b4c4a8d2a8996aa6aeb Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sat, 2 Dec 2023 15:50:42 -0500 Subject: [PATCH] fix: Fixes migration check (#1626) --- .github/porcelain.ps1 | 10 ++++++++++ .../Server/Migrations/Server.Items.BaseMulti.v0.json | 4 ++++ .../Migrations/Server.Items.VirtualCheck.v0.json | 4 ++++ azure-pipelines.yml | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/porcelain.ps1 create mode 100644 Projects/Server/Migrations/Server.Items.BaseMulti.v0.json create mode 100644 Projects/Server/Migrations/Server.Items.VirtualCheck.v0.json diff --git a/.github/porcelain.ps1 b/.github/porcelain.ps1 new file mode 100644 index 000000000..9eb225623 --- /dev/null +++ b/.github/porcelain.ps1 @@ -0,0 +1,10 @@ +$untrackedOrModified = git status --porcelain | Select-String -Pattern "^\?\? |^ M" + +if ($untrackedOrModified) { + Write-Host "Untracked or modified files found." + Exit 1 +} +else { + Write-Host "No untracked or modified files." + Exit 0 +} diff --git a/Projects/Server/Migrations/Server.Items.BaseMulti.v0.json b/Projects/Server/Migrations/Server.Items.BaseMulti.v0.json new file mode 100644 index 000000000..e9639f89b --- /dev/null +++ b/Projects/Server/Migrations/Server.Items.BaseMulti.v0.json @@ -0,0 +1,4 @@ +{ + "version": 0, + "type": "Server.Items.BaseMulti" +} \ No newline at end of file diff --git a/Projects/Server/Migrations/Server.Items.VirtualCheck.v0.json b/Projects/Server/Migrations/Server.Items.VirtualCheck.v0.json new file mode 100644 index 000000000..56fffa1a1 --- /dev/null +++ b/Projects/Server/Migrations/Server.Items.VirtualCheck.v0.json @@ -0,0 +1,4 @@ +{ + "version": 0, + "type": "Server.Items.VirtualCheck" +} \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a6471d135..20dd39c71 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,7 @@ jobs: - task: NuGetAuthenticate@1 - script: ./publish.cmd Release displayName: 'Build' - - script: git diff --exit-code ./**/Migrations/*.v*.json + - powershell: ./.github/porcelain.ps1 displayName: Migration Changes - script: dotnet test --no-restore displayName: 'Test'