Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembly version save #34

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>Heroesprofile.Uploader.Common</AssemblyName>
<RootNamespace>Heroesprofile.Uploader.Common</RootNamespace>
<Version>1.0.4</Version>
<AssemblyVersion>1.0.9.0</AssemblyVersion>
<AssemblyVersion>2.4.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 6 additions & 1 deletion Heroesprofile.Uploader.Common/Uploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Heroes.ReplayParser;
using System.IO;
using System.Diagnostics;
using System.Reflection;

namespace Heroesprofile.Uploader.Common
{
Expand Down Expand Up @@ -58,10 +59,14 @@ public async Task Upload(Replay replay_results, ReplayFile file, bool PostMatchP
/// <returns>Upload result</returns>
public async Task<UploadStatus> Upload(Replay replay_results, string fingerprint, string file, bool PostMatchPage)
{
Assembly assembly = Assembly.GetExecutingAssembly();
AssemblyName assemblyName = assembly.GetName();
Version assemblyVersion = assemblyName.Version;

try {
string response;
using (var client = new WebClient()) {
var bytes = await client.UploadFileTaskAsync($"{HeroesProfileApiEndpoint}/upload/heroesprofile/desktop/?fingerprint={fingerprint}", file);
var bytes = await client.UploadFileTaskAsync($"{HeroesProfileApiEndpoint}/upload/heroesprofile/desktop/?fingerprint={fingerprint}&version={assemblyVersion}", file);
response = Encoding.UTF8.GetString(bytes);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
<PackageReference Include="NuGet.CommandLine" Version="4.3.0" />
<PackageReference Include="SharpCompress" Version="0.17.1" />
<PackageReference Include="Splat" Version="1.6.2" />
<PackageReference Include="squirrel.windows" Version="1.9.1" />
<PackageReference Include="squirrel.windows">
<Version>1.7.8</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
Expand Down Expand Up @@ -222,7 +224,7 @@
<NuGetCommandLine Include="$(UserProfile)\.nuget\packages\NuGet.CommandLine\4.3.0\tools\nuget.exe">
<InProject>False</InProject>
</NuGetCommandLine>
<Squirrel Include="$(UserProfile)\.nuget\packages\Squirrel.Windows\1.7.8\tools\squirrel.exe">
<Squirrel Include="$(UserProfile)\.nuget\packages\Squirrel.Windows\1.9.1\tools\squirrel.exe">
<InProject>False</InProject>
</Squirrel>
</ItemGroup>
Expand Down Expand Up @@ -257,4 +259,4 @@
<Move SourceFiles="../Releases/Setup.exe" DestinationFiles="../Releases/HotsApiUploaderSetup.exe" />
<Message Importance="High" Text="Successfully created setup package" />
</Target>
</Project>
</Project>
4 changes: 2 additions & 2 deletions Heroesprofile.Uploader.Windows/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.1")]
[assembly: AssemblyFileVersion("2.3.1")]
[assembly: AssemblyVersion("2.4.0")]
[assembly: AssemblyFileVersion("2.4.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
2 changes: 1 addition & 1 deletion Heroesprofile.Uploader.Windows/SquirrelRelease.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

5: CD to Installer directory

6: Squirrel --releasify=Heroesprofile.Uploader.2.3.1.nupkg --no-msi --setupIcon=uploader_icon_light.ico
6: Squirrel --releasify=Heroesprofile.Uploader.2.4.0.nupkg --no-msi --setupIcon=uploader_icon_light.ico