Skip to content

Commit

Permalink
set version earlier in the build process so nuget gets the right one
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyGalbreath committed Apr 22, 2024
1 parent 88c8d99 commit 922e0ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions LiveMap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageId>LiveMap</PackageId>
<Version>0.0.4</Version>
<Ver>0.0.4</Ver>
<Version Condition="'$(BUILD_NUMBER)' != ''">$(Ver)+$(BUILD_NUMBER)</Version>
<Version Condition="'$(BUILD_NUMBER)' == ''">$(Ver)-SNAPSHOT</Version>
<Authors>BillyGalbreath</Authors>
<Company>Pl3x</Company>
<Description>A browser-based world map viewer for Vintage Story servers</Description>
Expand Down Expand Up @@ -64,16 +66,14 @@
<Copy SourceFiles="@(_CopyWebStuffs)" DestinationFolder="$(TargetDir)/assets/livemap/config/%(RecursiveDir)" SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true" Retries="3" RetryDelayMilliseconds="300" />
<PropertyGroup>
<ModInfoJson>$(TargetDir)/modinfo.json</ModInfoJson>
<VersionBuild Condition="'$(BUILD_NUMBER)' != ''">$(Version)+$(BUILD_NUMBER)</VersionBuild>
<VersionBuild Condition="'$(BUILD_NUMBER)' == ''">$(Version)-SNAPSHOT</VersionBuild>
</PropertyGroup>
<WriteLinesToFile Lines="$([System.IO.File]::ReadAllText($(ModInfoJson))
.Replace('{version}','$(VersionBuild)')
.Replace('{version}','$(Version)')
.Replace('{description}','$(Description)')
)" File="$(ModInfoJson)" Overwrite="true" Encoding="UTF-8"
/>
<MakeDir Directories="bin/mods" />
<ZipDirectory DestinationFile="bin/mods/livemap-$(VersionBuild).zip" SourceDirectory="$(TargetDir)" Overwrite="true" />
<ZipDirectory DestinationFile="bin/mods/livemap-$(Version).zip" SourceDirectory="$(TargetDir)" Overwrite="true" />
</Target>

</Project>

0 comments on commit 922e0ea

Please sign in to comment.