From 5fcf1aeb7580c6cd940027a33e448d0d5ed3ba73 Mon Sep 17 00:00:00 2001 From: Eivind Antonsen Date: Fri, 8 Mar 2024 23:20:52 +0100 Subject: [PATCH] Update version and streamline release script This commit updates the version of the DetectiveSpecs project in the .csproj file. It also simplifies the UploadRelease.ps1 script by removing unnecessary comments and streamlining the code. In addition, it modifies the solution file to reference this updated script. --- .github/scripts/UploadRelease.ps1 | 7 ------- DetectiveSpecs.sln | 2 +- DetectiveSpecs/DetectiveSpecs.csproj | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/scripts/UploadRelease.ps1 b/.github/scripts/UploadRelease.ps1 index 5673bcc..7f44b22 100644 --- a/.github/scripts/UploadRelease.ps1 +++ b/.github/scripts/UploadRelease.ps1 @@ -5,31 +5,24 @@ param( [String]$version ) -# Define paths $exeFilePath = "${workspace}\Staging\Build\DetectiveSpecs-v${version}.exe" $zipFilePath = "${workspace}\Staging\Build\DetectiveSpecs-v${version}.zip" -# Remove any existing zip file at the destination path if (Test-Path $zipFilePath) { Remove-Item -Path $zipFilePath } -# Create new compressed zip file Compress-Archive -Path $exeFilePath -DestinationPath $zipFilePath -# Define GitHub API url $assetFileName = [System.IO.Path]::GetFileName($zipFilePath) $uri = "https://uploads.github.com/repos/EivindAntonsen/DetectiveSpecs/releases/${releaseId}/assets?name=${assetFileName}" -# Define headers for API request $headers = @{ "Accept" = "application/vnd.github+json" "Authorization" = "Bearer $accessToken" "Content-Type" = "application/octet-stream" } -# Read file data as bytes $fileContent = [System.IO.File]::ReadAllBytes($zipFilePath) -# Make API request to upload file Invoke-RestMethod -Method 'POST' -Uri $uri -Headers $headers -Body $fileContent \ No newline at end of file diff --git a/DetectiveSpecs.sln b/DetectiveSpecs.sln index 06a0e14..460df93 100644 --- a/DetectiveSpecs.sln +++ b/DetectiveSpecs.sln @@ -6,9 +6,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionIt ProjectSection(SolutionItems) = preProject .github\workflows\CI.yaml = .github\workflows\CI.yaml .github\scripts\CreateRelease.ps1 = .github\scripts\CreateRelease.ps1 - .github\scripts\UploadRelease2.ps1 = .github\scripts\UploadRelease2.ps1 .github\scripts\CheckVersion.ps1 = .github\scripts\CheckVersion.ps1 .github\scripts\Publish.ps1 = .github\scripts\Publish.ps1 + .github\scripts\UploadRelease.ps1 = .github\scripts\UploadRelease.ps1 EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{F73FB88E-6BDB-47AE-B7D5-10AEDF308627}" diff --git a/DetectiveSpecs/DetectiveSpecs.csproj b/DetectiveSpecs/DetectiveSpecs.csproj index 1b8649d..2da0a08 100644 --- a/DetectiveSpecs/DetectiveSpecs.csproj +++ b/DetectiveSpecs/DetectiveSpecs.csproj @@ -5,7 +5,7 @@ net8.0-windows enable enable - 1.0.10 + 1.0.11