Skip to content

Commit 305aa88

Browse files
authored
Overhaul TaglibSharp, lots of changes
* Bump version -> 2.2.0.0 * C#-ify * Multitargeting - Target net462, netstandard 2.0 * Convert to new csproj files * Update travis-ci * Add appveyor * Add .editorconfig and reformat code * Hopefully this'll result in fewer formatting issues in future PRs * Update and improve autotools files * Add raw-samples tests back * Add Directory.Build.* to centralize some build values * Add nupkg build to TaglibSharp project * Remove old policy file * Since we are targeting net462 we can take advantage of the auto binding redirect feature that projects have available now.
1 parent 60e7588 commit 305aa88

File tree

645 files changed

+31953
-134212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

645 files changed

+31953
-134212
lines changed

.editorconfig

+84-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,90 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
1+
# EditorConfig is awesome:http://EditorConfig.org
22

33
# top-most EditorConfig file
44
root = true
55

6-
# MediaPortal code style
6+
# Baseline
77
[*]
8+
charset = utf-8
89
indent_style = tab
9-
end_of_line = crlf
10-
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
max_line_length = 120
12+
13+
# MSBuild
14+
[*.{csproj,proj,projitems,shproj,fsproj,target,props}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
# XML config files
19+
[*.{config,nuspec,resx}]
20+
indent_style = space
21+
indent_size = 2
22+
23+
# JSON files
24+
[*.json]
25+
indent_style = space
26+
indent_size = 2
27+
28+
# Dotnet code style settings:
29+
[*.{cs}]
30+
31+
# Sort using and Import directives with System.* appearing first
32+
dotnet_sort_system_directives_first = true
33+
34+
# Avoid "this." and "Me." if not necessary
35+
dotnet_style_qualification_for_field = false:suggestion
36+
dotnet_style_qualification_for_property = false:suggestion
37+
dotnet_style_qualification_for_method = false:suggestion
38+
dotnet_style_qualification_for_event = false:suggestion
39+
40+
# Use language keywords instead of framework type names for type references
41+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
42+
dotnet_style_predefined_type_for_member_access = true:suggestion
43+
44+
# Suggest more modern language features when available
45+
dotnet_style_object_initializer = true:suggestion
46+
dotnet_style_collection_initializer = true:suggestion
47+
dotnet_style_coalesce_expression = true:suggestion
48+
dotnet_style_null_propagation = true:suggestion
49+
dotnet_style_explicit_tuple_names = true:suggestion
50+
51+
# CSharp code style settings:
52+
[*.cs]
53+
54+
# spaces before parens
55+
csharp_space_between_method_declaration_name_and_open_parenthesis = true
56+
csharp_space_between_method_call_name_and_opening_parenthesis = true
57+
csharp_space_after_keywords_in_control_flow_statements = true
58+
59+
# Newline settings
60+
csharp_new_line_before_open_brace = types,methods
61+
csharp_new_line_before_else = false
62+
csharp_new_line_before_catch = false
63+
csharp_new_line_before_finally = false
64+
csharp_new_line_before_members_in_object_initializers = true
65+
csharp_new_line_before_members_in_anonymous_types = true
66+
67+
# Switch indentation
68+
csharp_indent_switch_labels = false
69+
70+
# Prefer "var" everywhere it's apparent
71+
csharp_style_var_for_built_in_types = true:none
72+
csharp_style_var_when_type_is_apparent = true:suggestion
73+
csharp_style_var_elsewhere = true:none
74+
75+
# Prefer method-like constructs to have a block body
76+
csharp_style_expression_bodied_methods = false:none
77+
csharp_style_expression_bodied_constructors = false:none
78+
csharp_style_expression_bodied_operators = false:none
79+
80+
# Prefer property-like constructs to have an expression-body
81+
csharp_style_expression_bodied_properties = true:none
82+
csharp_style_expression_bodied_indexers = true:none
83+
csharp_style_expression_bodied_accessors = true:none
84+
85+
# Suggest more modern language features when available
86+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
87+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
88+
csharp_style_inlined_variable_declaration = true:suggestion
89+
csharp_style_throw_expression = true:suggestion
90+
csharp_style_conditional_delegate_call = true:suggestion

.gitignore

+7-15
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,22 @@ obj/
88
config.log
99
config.status
1010
configure
11-
*.exe
12-
*.mdb
13-
*.pdb
14-
*.pidb
1511
*.config
1612
install-sh
1713
missing
1814
*.pc
1915
*.zip
20-
tests/samples/tmp*
16+
*.dll
17+
*.pdb
18+
*.exe
2119
docs/*.xml
2220
docs/*/*
2321
docs/*.tree
24-
*.dll.xml
25-
examples/*.dll
2622
*.userprefs
27-
src/*.dll
28-
src/*.snk
29-
tests/*.dll
30-
tests/*.xml
31-
test-results
3223
.*.swp
3324
packages
34-
.vs/*
35-
!packages.config
25+
.vs
3626
.DS_Store
37-
src/taglib-sharp.XML
27+
TestResult.xml
28+
src/TaglibSharp.Tests/samples/tmp*
29+
*.sln.DotSettings.user

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/TaglibSharp.Tests/raw-samples"]
2+
path = src/TaglibSharp.Tests/raw-samples
3+
url = https://github.com/f-spot/raw-samples.git

.travis.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
sudo: required
22
dist: trusty
33
language: csharp
4-
solution: taglib-sharp.sln
5-
dotnet: 2.1.4
4+
solution: TaglibSharp.sln
65
mono: latest
76

87
# https://github.com/travis-ci/travis-ci/issues/5932#issuecomment-215693171
@@ -13,12 +12,17 @@ before_install:
1312

1413
install:
1514
- sudo apt-get update -qq > /dev/null
16-
- mono .nuget/nuget.exe restore taglib-sharp.sln -Verbosity detailed
17-
- mono .nuget/nuget.exe install NUnit.Runners -Version 3.8.0 -OutputDirectory packages
18-
- dotnet restore
15+
# - mono .nuget/nuget.exe restore TaglibSharp.sln -Verbosity detailed
16+
- mono .nuget/nuget.exe install NUnit.Runners -Version 3.9.0 -OutputDirectory packages
1917

2018
script:
2119
- ./autogen.sh
22-
- msbuild taglib-sharp.sln
23-
- cd tests
24-
- mono ../packages/NUnit.ConsoleRunner.3.8.0/tools/nunit3-console.exe --labels=All tests.dll
20+
- make
21+
- make dist # Let's make sure we don't break make dist
22+
- cd src/TaglibSharp.Tests/bin/Debug
23+
- mono ../../../../packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe --labels=All net462/TaglibSharp.Tests.dll
24+
# This errors out for some reason:
25+
# System.IO.FileNotFoundException: Unable to find tests for C:\code\taglib-sharp\src\TaglibSharp.Tests\bin\Debug\netstandard2.0\TaglibSharp.Tests.dll.
26+
# Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate.
27+
# Rerun with /diag option to diagnose further.
28+
# - mono ../../../../packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe --labels=All netstandard2.0/TaglibSharp.Tests.dll

AUTHORS

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Maintainer:
2-
Gabriel Burt <[email protected]>
2+
Stephen Shaw
33

44
Contributors:
55
Aaron Bockover
@@ -36,3 +36,6 @@ Contributors:
3636

3737
Creator, past maintainer:
3838
Brian Nickel <[email protected]>
39+
40+
Past maintainers:
41+
Gabriel Burt <[email protected]>

Directory.Build.props

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ReleaseVersion>2.2.0.0</ReleaseVersion>
4+
<RepositoryUrl>https://github.com/mono/taglib-sharp</RepositoryUrl>
5+
<RepositoryType>git</RepositoryType>
6+
<TaglibSharpTargetFramework>net462;netstandard2.0</TaglibSharpTargetFramework>
7+
<LangVersion>latest</LangVersion>
8+
</PropertyGroup>
9+
</Project>

Directory.Build.targets

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
3+
</Project>

Makefile.am

+12-34
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
SUBDIRS = \
2-
src \
3-
examples \
4-
docs
5-
6-
if !IN_DIST
7-
SUBDIRS += tests
8-
endif
9-
10-
DIST_SUBDIRS = \
11-
src \
12-
examples \
13-
docs
2+
src \
3+
examples \
4+
docs
145

156
pkgconfig_in_files = taglib-sharp.pc.in
167
pkgconfigdir = $(datadir)/pkgconfig
178
pkgconfig_DATA = $(pkgconfig_in_files:.pc.in=.pc)
189

1910
EXTRA_DIST = \
2011
$(pkgconfig_in_files) \
21-
taglib-sharp.snk \
22-
taglib-sharp.sln
12+
TaglibSharp.sln
2313

2414
DISTCLEANFILES = taglib-sharp.pc
2515

@@ -38,10 +28,13 @@ MAINTAINERCLEANFILES = \
3828
config.guess \
3929
mkinstalldirs
4030

41-
if !IN_DIST
42-
test:
43-
cd tests; make test; cd ..;
44-
endif
31+
32+
all: sln_build
33+
echo "Building TaglibSharp solution"
34+
35+
test: all
36+
nuget install NUnit.Runners -Version 3.9.0 -OutputDirectory packages
37+
$(MONO) packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe --labels=All $(srcdir)/src/TaglibSharp.Tests/bin/Debug/$(TARGET_FRAMEWORK)/TaglibSharp.Tests.dll
4538

4639
distwin: all
4740
mkdir -p $(srcdir)/$(WINDIR)
@@ -57,19 +50,4 @@ distwin: all
5750
zip -9 -r $(srcdir)/$(WINDIR).zip $(srcdir)/$(WINDIR)
5851
rm -rf $(srcdir)/$(WINDIR)
5952

60-
UPLOAD_HOST = "[email protected]"
61-
UPLOAD_PATH = "web/download.banshee.fm/taglib-sharp"
62-
push-release: distcheck distwin
63-
[[ -z "$$BANSHEE_USER" ]] && { echo "Set BANSHEE_USER"; exit 1; } || true
64-
mkdir -p release
65-
mv $(WINDIR).zip release
66-
mv $(PACKAGE)-$(VERSION).tar.* release
67-
cp ChangeLog release/$(PACKAGE)-$(VERSION).changes
68-
cp NEWS release/$(PACKAGE)-$(VERSION).news
69-
pushd release; sha256sum * > $(PACKAGE)-$(VERSION).sha256sum; popd
70-
scp -r release $(UPLOAD_HOST):$(UPLOAD_PATH)/$(VERSION)
71-
rm -rf release
72-
ssh $(UPLOAD_HOST) rm -f $(UPLOAD_PATH)/LATEST-IS\*
73-
ssh $(UPLOAD_HOST) touch $(UPLOAD_PATH)/LATEST-IS-$(VERSION)
74-
git tag -a -m "Tag for taglib-sharp release ${VERSION}" taglib-sharp-${VERSION} || bail "Could not create tag"
75-
git push origin taglib-sharp-${VERSION} || bail "Failed to push tag to remote"
53+
include $(top_srcdir)/build/msbuild.include

0 commit comments

Comments
 (0)