Skip to content

Commit

Permalink
修复没有指定excludes时所有文件都被忽略的问题
Browse files Browse the repository at this point in the history
# Release

## 修复
1. 修复没有指定`excludes`时所有文件都被忽略的问题
2. Fix #8
  • Loading branch information
liesauer committed Apr 24, 2020
1 parent 05e4564 commit 6f0faba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Change Log

### v1.2.8
#### 修复
1. 修复没有指定`excludes`时所有文件都被忽略的问题
2. Fix #8

### v1.2.7
#### 新增
1. `BeautyExcludes`选项
Expand Down
2 changes: 1 addition & 1 deletion Common/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackageOutputPath>.nupkg</PackageOutputPath>
<Version>1.2.7</Version>
<Version>1.2.8</Version>

<Company>nulastudio</Company>
<Authors>LiesAuer</Authors>
Expand Down
2 changes: 1 addition & 1 deletion NetCoreBeautyNugetTest/NetCoreBeautyTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="nulastudio.NetCoreBeauty" Version="1.2.7" />
<PackageReference Include="nulastudio.NetCoreBeauty" Version="1.2.8" />
</ItemGroup>

</Project>
3 changes: 3 additions & 0 deletions src/main/beauty.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ func moveDeps(depsFiles []string, mainProgram string) int {
var shouldExclude = func(file string) bool {
exclude := false
for _, excludePattern := range excludeFiles {
if excludePattern == "" {
continue
}
if regex, err := regexp.Compile(strings.ReplaceAll(excludePattern, "*", ".*")); err == nil {
exclude = regex.MatchString(file)
if exclude {
Expand Down

0 comments on commit 6f0faba

Please sign in to comment.