fix duplicate aliases from color codes (AB#5)

This commit is contained in:
RaidMax 2019-12-27 14:42:17 -06:00
parent d4b5120953
commit 82381457df
2 changed files with 8 additions and 5 deletions

View File

@ -51,10 +51,12 @@ namespace WebfrontCore.Controllers
NetworkId = client.NetworkId,
Meta = new List<ProfileMeta>(),
Aliases = client.AliasLink.Children
.Select(a => a.Name)
.Prepend(client.Name)
.OrderBy(a => a)
.Select(_alias => _alias.Name)
.GroupBy(_alias => _alias.StripColors())
// we want the longest "duplicate" name
.Select(_grp => _grp.OrderByDescending(_name => _name.Length).First())
.Distinct()
.OrderBy(a => a)
.ToList(),
IPs = client.AliasLink.Children
.Where(i => i.IPAddress != null)

View File

@ -132,10 +132,11 @@ steps:
tagSource: 'userSpecifiedTag'
tag: '$(VersionInformation.Major).$(VersionInformation.Minor)-$(buildConfiguration)$(VersionInformation.Build)r$(VersionInformation.Revision)-$(Build.BuildId)'
title: 'Version $(VersionInformation.Major).$(VersionInformation.Minor) $(buildConfiguration) $(VersionInformation.Build) Revision $(VersionInformation.Revision) Build $(Build.BuildId)'
releaseNotesFilePath: '$(Build.Repository.LocalPath)/version.txt'
assets: '$(Build.ArtifactStagingDirectory)/*.zip'
isPreRelease: true
changeLogCompareToRelease: 'lastFullRelease'
releaseNotesSource: 'inline'
releaseNotesInline: 'todo'
changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased'
- task: PublishPipelineArtifact@1