Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollo3zehn committed Feb 27, 2024
1 parent 2a6cc5c commit c8f7a96
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v2.0.0-beta.4 - 2024-02-27

- Fix prefix modification algorithm.

## v2.0.0-beta.3 - 2024-02-27

- Fix prefix modification algorithm.
Expand Down
10 changes: 6 additions & 4 deletions src/Nexus.Sources.Federation/Federation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Federation : IDataSource
{
private DataSourceContext _context = default!;
private Api.NexusClient _nexusClient = default!;
private string _sourcePath = default!;
private string _sourcePath = "/";
private string _mountPoint = default!;
private string _includePattern = default!;

Expand Down Expand Up @@ -53,7 +53,9 @@ public Task SetContextAsync(DataSourceContext context, ILogger logger, Cancellat

// source-path
var sourcePath = _context.SourceConfiguration?.GetStringValue($"source-path");
_sourcePath = sourcePath ?? "";

if (sourcePath is not null)
_sourcePath = sourcePath;

// mount-point
var mountPoint = _context.SourceConfiguration?.GetStringValue($"mount-point");
Expand Down Expand Up @@ -130,12 +132,12 @@ public async Task ReadAsync(DateTime begin, DateTime end, ReadRequest[] requests

private string ToMountPointPrefixedCatalogId(string catalogId)
{
return _mountPoint + catalogId.Substring(_sourcePath.Length + 1);
return _mountPoint + catalogId.Substring(_sourcePath.Length);
}

private string ToSourcePathPrefixedCatalogId(string catalogId)
{
return _sourcePath + catalogId.Substring(_mountPoint.Length + 1);
return _sourcePath + catalogId.Substring(_mountPoint.Length);
}
}
}
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.0.0",
"suffix": "beta.3"
"suffix": "beta.4"
}

0 comments on commit c8f7a96

Please sign in to comment.