Skip to content

Commit

Permalink
Fix FilterName (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
cugu committed May 12, 2020
1 parent b2a0f66 commit 83e82de
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions goartifacts/expansion.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,31 @@ func expandArtifactGroup(names []string, definitions map[string]ArtifactDefiniti
continue
}

if !isOSArtifactDefinition(runtime.GOOS, artifact.SupportedOs) {
continue
}

onlyGroup := true
for _, source := range artifact.Sources {
if source.Type == SourceType.ArtifactGroup {
for subName, subArtifact := range expandArtifactGroup(source.Attributes.Names, definitions) {
selected[subName] = subArtifact
if isOSArtifactDefinition(runtime.GOOS, source.SupportedOs) {
for subName, subArtifact := range expandArtifactGroup(source.Attributes.Names, definitions) {
selected[subName] = subArtifact
}
}
} else {
onlyGroup = false
}
}
if !onlyGroup {
var sources []Source
for _, source := range artifact.Sources {
if isOSArtifactDefinition(runtime.GOOS, source.SupportedOs) {
sources = append(sources, source)
}
}
artifact.Sources = sources

selected[artifact.Name] = artifact
}
}
Expand Down

0 comments on commit 83e82de

Please sign in to comment.