Skip to content

Commit

Permalink
Fix Upgrade Issue (#81)
Browse files Browse the repository at this point in the history
Bug Fix:

* Upgrade fails since all deployed binaries are incorrectly versioned
  • Loading branch information
yogilad authored Nov 4, 2023
1 parent c820451 commit bd3318c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.exe
*.vs
*.user
*.msi
Expand Down
7 changes: 4 additions & 3 deletions Src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Version>`, `<AssemblyVersion>`, and `<FileVersion>` 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

Expand Down
10 changes: 1 addition & 9 deletions Src/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions Src/directory.build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>0.1.3</Version>
<AssemblyVersion>0.1.3</AssemblyVersion>
<FileVersion>0.1.3</FileVersion>
</PropertyGroup>
</Project>

0 comments on commit bd3318c

Please sign in to comment.