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

bugfix: Try to get version info from file #458

Merged
merged 7 commits into from
Feb 20, 2025
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
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.403
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Set assembly version to major semver
Expand All @@ -28,6 +24,10 @@ jobs:
run: sed -i -e "s|0.0.0.0<\/Version>|$RELEASE_VERSION<\/Version>|g" Directory.Build.props
- name: Sed AssemblyVersion number for build purposes
run: sed -i -e "s|0.0.0.0<\/AssemblyVersion>>|$RELEASE_VERSION<\/AssemblyVersion>>|g" Directory.Build.props
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION -p:InformationalVersion=$RELEASE_VERSION --configuration Release --no-restore
- name: Pack nupkg
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
- name: Pack nupkg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ConstructorMethod : AbstractDocumentTests
private static string Document_file_path()
{
var executingAssembly = Assembly.GetExecutingAssembly();
var executablePath = Path.GetDirectoryName(executingAssembly.CodeBase);
var executablePath = Path.GetDirectoryName(executingAssembly.Location);
var documentPath = Path.Combine(executablePath, "Resources", "Documents", "Dokument.pdf");
return new Uri(documentPath).LocalPath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ public void Constructor_with_certificate_thumbprint()
Assert.Equal(certificate, clientConfiguration.Certificate);
}

[Fact]
public void Constructor_with_no_sender_and_certificate_exists()
{
//Arrange

//Act
new ClientConfiguration(Environment.DifiQa, new X509Certificate2());

//Assert
}

[Fact]
public void Constructor_with_no_sender_and_certificate_thumbprint_exists()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ public void Converts_document_successfully()
{
//Arrange
const string title = "JobTitle";
const string message = "Message";
const FileType fileType = FileType.Pdf;
var documentBytes = new byte[] {0x21, 0x22};

Expand Down
4 changes: 2 additions & 2 deletions Digipost.Signature.Api.Client.Program/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class Program

private static void Main(string[] args)
{
var stringPrivateOrganizationNumber = "088015814";
//var stringPrivateOrganizationNumber = "088015814";
var stringPublicOrganizationNumber = "988015814";

var testEnvironment = Environment.Test;
Expand Down Expand Up @@ -132,7 +132,7 @@ private static async Task PortalFlow(ClientConfiguration clientConfiguration, Li
}
catch (Exception e)
{
Log.LogError("Exception: ", e.Message);
Log.LogError("Exception: {ExceptionMessage}", e.Message);
}
}
}
Expand Down