Skip to content

Commit 29faa27

Browse files
authored
Merge pull request #458 from digipost/version-number-fixing
bugfix: Try to get version info from file
2 parents 719df0f + f8288e0 commit 29faa27

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ jobs:
1414
uses: actions/setup-dotnet@v4
1515
with:
1616
dotnet-version: 8.0.403
17-
- name: Install dependencies
18-
run: dotnet restore
19-
- name: Build
20-
run: dotnet build --configuration Release --no-restore
2117
- name: Set release version
2218
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
2319
- name: Set assembly version to major semver
@@ -28,6 +24,10 @@ jobs:
2824
run: sed -i -e "s|0.0.0.0<\/Version>|$RELEASE_VERSION<\/Version>|g" Directory.Build.props
2925
- name: Sed AssemblyVersion number for build purposes
3026
run: sed -i -e "s|0.0.0.0<\/AssemblyVersion>>|$RELEASE_VERSION<\/AssemblyVersion>>|g" Directory.Build.props
27+
- name: Install dependencies
28+
run: dotnet restore
29+
- name: Build
30+
run: dotnet build -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION -p:InformationalVersion=$RELEASE_VERSION --configuration Release --no-restore
3131
- name: Pack nupkg
3232
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION -p:InformationalVersion=$RELEASE_VERSION --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Core
3333
- name: Pack nupkg

Digipost.Signature.Api.Client.Core.Tests/AbstractDocumentTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ConstructorMethod : AbstractDocumentTests
1515
private static string Document_file_path()
1616
{
1717
var executingAssembly = Assembly.GetExecutingAssembly();
18-
var executablePath = Path.GetDirectoryName(executingAssembly.CodeBase);
18+
var executablePath = Path.GetDirectoryName(executingAssembly.Location);
1919
var documentPath = Path.Combine(executablePath, "Resources", "Documents", "Dokument.pdf");
2020
return new Uri(documentPath).LocalPath;
2121
}

Digipost.Signature.Api.Client.Core.Tests/ClientConfigurationTests.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ public void Constructor_with_certificate_thumbprint()
5050
Assert.Equal(certificate, clientConfiguration.Certificate);
5151
}
5252

53-
[Fact]
54-
public void Constructor_with_no_sender_and_certificate_exists()
55-
{
56-
//Arrange
57-
58-
//Act
59-
new ClientConfiguration(Environment.DifiQa, new X509Certificate2());
60-
61-
//Assert
62-
}
63-
6453
[Fact]
6554
public void Constructor_with_no_sender_and_certificate_thumbprint_exists()
6655
{

Digipost.Signature.Api.Client.Direct.Tests/DataTransferObjects/DataTransferObjectConverterTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ public void Converts_document_successfully()
181181
{
182182
//Arrange
183183
const string title = "JobTitle";
184-
const string message = "Message";
185184
const FileType fileType = FileType.Pdf;
186185
var documentBytes = new byte[] {0x21, 0x22};
187186

Digipost.Signature.Api.Client.Program/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class Program
2222

2323
private static void Main(string[] args)
2424
{
25-
var stringPrivateOrganizationNumber = "088015814";
25+
//var stringPrivateOrganizationNumber = "088015814";
2626
var stringPublicOrganizationNumber = "988015814";
2727

2828
var testEnvironment = Environment.Test;
@@ -132,7 +132,7 @@ private static async Task PortalFlow(ClientConfiguration clientConfiguration, Li
132132
}
133133
catch (Exception e)
134134
{
135-
Log.LogError("Exception: ", e.Message);
135+
Log.LogError("Exception: {ExceptionMessage}", e.Message);
136136
}
137137
}
138138
}

0 commit comments

Comments
 (0)