Skip to content

Commit

Permalink
Ensure package check uses the latest version of packages
Browse files Browse the repository at this point in the history
Ensure package check uses the latest version of packages
  • Loading branch information
chwebdude authored Nov 7, 2022
2 parents 7223d0c + c74ac64 commit fcfe9ae
Show file tree
Hide file tree
Showing 12 changed files with 4,997 additions and 1,351 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 7 additions & 5 deletions DependencyChecker/Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,13 @@ private async Task<PackageStatus> GetPackageStatus(string packageId, string inst
foreach (var packageMetadataResource in _packageMetadataResources)
{
// Todo: Include Prerelease option
var results = await packageMetadataResource.GetMetadataAsync(packageId, _options.IncludePrereleases, false, _logger, CancellationToken.None);
if (results.Count() != 0)
var results = (await packageMetadataResource.GetMetadataAsync(packageId, _options.IncludePrereleases, false, _logger, CancellationToken.None))
.ToList();
if (results.Any())
{
searchResult = results.Last();
searchResult = results
.OrderByDescending(r => r.Published)
.First();
break;
}
}
Expand Down Expand Up @@ -369,8 +372,7 @@ private void Initialize()
_logger.LogInformation("Adding DevOps Feed with the provided credentials...");
var ps = new PackageSource(_options.AzureArtifactsFeedUri)
{
Credentials = new PackageSourceCredential(_options.AzureArtifactsFeedUri, username, token, true,
"basic,negotiate")
Credentials = new PackageSourceCredential(_options.AzureArtifactsFeedUri, username, token, true, "basic,negotiate")
};

var sr = new SourceRepository(ps, Repository.Provider.GetCoreV3());
Expand Down
8 changes: 8 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
cd ./buildtab
cmd /c "yarn && yarn run build"
cd ../buildtask
cmd /c "yarn && yarn run build"
cd ..
dotnet restore
dotnet build -c Release --no-restore
dotnet publish --no-build -o ./buildtask/bin
tfx extension create --manifest-globs vss-extension.json
Loading

0 comments on commit fcfe9ae

Please sign in to comment.