dotnet / dotnet-docker-nightly

This repository has moved to the nightly branch of dotnet/dotnet-docker.
https://github.com/dotnet/dotnet-docker/tree/nightly
MIT License
35 stars 30 forks source link

Align 1.* folder structure with 2.* #491

Closed ravimeda closed 6 years ago

ravimeda commented 6 years ago

Filtering logic uses a wildcard to match any character(s) after the specified, if any, version and OS filters.

$buildFilter = "$VersionFilter*/*/$OSFilter*"

Refer https://github.com/dotnet/dotnet-docker-nightly/pull/490/files#diff-5eb43610b02eda87c0c4550f32a64b09R26

This logic was written this way since 1. folder structure does not align with 2.. After alignment, this logic can be cleaned up as follows -

$buildFilter = ''
if (-not [string]::IsNullOrEmpty($versionFilter))
{
$buildFilter = "$versionFilter/$buildFilter"
}
if (-not [string]::IsNullOrEmpty($OsFilter))
{
$buildFilter += "$buildFilter/$OsFilter/"
}