Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Sources accept ReleaseEntryName for feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Dec 20, 2023
1 parent 7ea1ea6 commit bcee206
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Squirrel/Sources/GithubSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public GithubSource(string repoUrl, string accessToken, bool prerelease, string
}

/// <inheritdoc />
public override async Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntry latestLocalRelease = null)
public override async Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntryName latestLocalRelease = null)
{
var releases = await GetReleases(Prerelease).ConfigureAwait(false);
if (releases == null || releases.Count() == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/Squirrel/Sources/GitlabSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public override Task DownloadReleaseEntry(ReleaseEntry releaseEntry, string loca
}

/// <inheritdoc />
public override async Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntry latestLocalRelease = null)
public override async Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntryName latestLocalRelease = null)
{
var releases = await GetReleases(UpcomingRelease).ConfigureAwait(false);
if (releases == null || releases.Count() == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/Squirrel/Sources/IUpdateSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface IUpdateSource
/// </param>
/// <returns>An array of <see cref="ReleaseEntry"/> objects that are available for download
/// and are applicable to this user.</returns>
Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntry latestLocalRelease = null);
Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntryName latestLocalRelease = null);

/// <summary>
/// Download the specified <see cref="ReleaseEntry"/> to the provided local file path.
Expand Down
2 changes: 1 addition & 1 deletion src/Squirrel/Sources/SimpleFileSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public SimpleFileSource(DirectoryInfo baseDirectory, string channel = null, ILog
}

/// <inheritdoc />
public override Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntry latestLocalRelease = null)
public override Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntryName latestLocalRelease = null)
{
if (!BaseDirectory.Exists)
throw new Exception($"The local update directory '{BaseDirectory.FullName}' does not exist.");
Expand Down
2 changes: 1 addition & 1 deletion src/Squirrel/Sources/SimpleWebSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public SimpleWebSource(Uri baseUri, string channel = null, IFileDownloader downl
}

/// <inheritdoc />
public override async Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntry latestLocalRelease = null)
public override async Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntryName latestLocalRelease = null)
{
var uri = Utility.AppendPathToUri(BaseUri, GetReleasesFileName());
var args = new Dictionary<string, string>();
Expand Down
2 changes: 1 addition & 1 deletion src/Squirrel/Sources/SourceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public SourceBase(string channel, ILogger logger)
protected virtual string GetReleasesFileName() => String.IsNullOrWhiteSpace(Channel) ? "RELEASES" : $"RELEASES-{Channel}";

/// <inheritdoc/>
public abstract Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntry latestLocalRelease = null);
public abstract Task<ReleaseEntry[]> GetReleaseFeed(Guid? stagingId = null, ReleaseEntryName latestLocalRelease = null);

/// <inheritdoc/>
public abstract Task DownloadReleaseEntry(ReleaseEntry releaseEntry, string localFile, Action<int> progress);
Expand Down

0 comments on commit bcee206

Please sign in to comment.