From bd3318c7ef88e272deaf43f15db2d17256d7141d Mon Sep 17 00:00:00 2001 From: Yochai Gilad Date: Sat, 4 Nov 2023 22:02:35 +0200 Subject: [PATCH] Fix Upgrade Issue (#81) Bug Fix: * Upgrade fails since all deployed binaries are incorrectly versioned --- .gitignore | 1 + Src/README.md | 7 ++++--- Src/build.bat | 10 +--------- Src/directory.build.props | 8 ++++++++ 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 Src/directory.build.props diff --git a/.gitignore b/.gitignore index 97d760f..cf469f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.exe *.vs *.user *.msi diff --git a/Src/README.md b/Src/README.md index 2450e2f..4e679c4 100644 --- a/Src/README.md +++ b/Src/README.md @@ -24,15 +24,16 @@ ## Before Publishing a New Release 1. Create a new PR named _v[Major].[Minor].\[Build\]_ 1. Edit `ReleaseNotes.md` -1. Update the version in `Src\App\Utils\Common\AppConstants.cs` to _v[Major].[Minor].\[Build\]_ +1. In `Src\App\Utils\Common\AppConstants.cs` update the value of `ApplicationVersion` to _[Major].[Minor].\[Build\]_ +1. in `Src\directory.build.targets` update the values of ``, ``, and `` to to _[Major].[Minor].\[Build\]_ 1. In Visual Studio, 1. Select the _Setup_ project - 1. Set the version in the properties pane to _v[Major].[Minor].\[Build\]_ + 1. Set the `version` in the properties pane to _v[Major].[Minor].\[Build\]_ 1. Confirm the dialog requesting _ProductCode_ change ## Build 1. Open a shell (cmd) window and CD into the Src directory -1. Run the build script `build.bat [version]` where _[version]_ is _[Major].[Minor].\[Build\]_ (do not use the 'v' prefix) +1. Run the build script `build.bat` 1. Confirm the build had ended sucessfully 1. In Visual Studio, set the build type to `Release` and build the `Setup` project diff --git a/Src/build.bat b/Src/build.bat index f0ffef2..49b193a 100644 --- a/Src/build.bat +++ b/Src/build.bat @@ -4,14 +4,6 @@ REM * build.bat [version] echo off -REM * Version -Set VERSION=%1 -if defined VERSION (goto Continue) -echo Please pass the build version in the first argument e.g. build.bat 1.0.0 -goto End - -:Continue - REM * Clean echo Cleaning up build targets... rmdir App\Klipboard\bin\Release /s /q @@ -23,7 +15,7 @@ echo Starting build... dotnet restore -p:configuration=Release if %errorlevel% neq 0 ( goto BuildFailed) -dotnet build -p:configuration=Release -p:Version=%VERSION% +dotnet build -p:configuration=Release if %errorlevel% neq 0 ( goto BuildFailed) REM * Publish diff --git a/Src/directory.build.props b/Src/directory.build.props new file mode 100644 index 0000000..f943332 --- /dev/null +++ b/Src/directory.build.props @@ -0,0 +1,8 @@ + + + + 0.1.3 + 0.1.3 + 0.1.3 + + \ No newline at end of file