Skip to content

Commit c82fe5e

Browse files
initial commit
0 parents  commit c82fe5e

15 files changed

+712
-0
lines changed

.circleci/config.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: /app
5+
docker:
6+
- image: microsoft/aspnetcore-build:2.0
7+
environment:
8+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
9+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
10+
steps:
11+
- run:
12+
name: Print environment versions
13+
command: |
14+
NPM_V=$(npm -v)
15+
echo npm version':' $NPM_V
16+
DOTNET_CLI_V=$(dotnet --version)
17+
echo dotnet cli version':' $DOTNET_CLI_V
18+
- checkout
19+
- run:
20+
name: dotnet restore
21+
command: dotnet restore
22+
- run:
23+
name: dotnet build
24+
command: dotnet build
25+
- run:
26+
name: test
27+
command: npm test
28+
- deploy:
29+
name: Publish NuGet
30+
command: |
31+
if [ "$CIRCLE_BRANCH" != "master" ]; then
32+
echo -e "\e[33m Branch does not publish -- exit!"
33+
exit
34+
fi
35+
. ./.circleci/utils.sh
36+
37+
if [ "$API_KEY" == "" ]; then
38+
echo API_KEY environment variable not defined.
39+
exit 1
40+
fi
41+
42+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
43+
dotnet pack /p:PackageVersion=$PACKAGE_VERSION -o ../../ -c release --include-symbols
44+
dotnet nuget push *.nupkg -k $API_KEY -s https://www.nuget.org/api/v2/package
45+
46+
print_title "git tag"
47+
git tag $PACKAGE_VERSION
48+
git push --tags

.circleci/utils.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
print_title() {
3+
echo -e "\e[36m ---- $1 ---- \e[39m"
4+
}

.editorconfig

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
6+
[*.{json,yml,csproj,md}]
7+
indent_size = 2
8+
indent_style = space
9+
10+
11+
# Dotnet code style settings:
12+
[*.{cs,vb}]
13+
# Sort using and Import directives with System.* appearing first
14+
dotnet_sort_system_directives_first = true
15+
# Avoid "this." and "Me." if not necessary
16+
dotnet_style_qualification_for_field = true:warn
17+
dotnet_style_qualification_for_property = true:warn
18+
dotnet_style_qualification_for_method = true:warn
19+
dotnet_style_qualification_for_event = true:warn
20+
21+
# Use language keywords instead of framework type names for type references
22+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
23+
dotnet_style_predefined_type_for_member_access = true:suggestion
24+
25+
# Suggest more modern language features when available
26+
dotnet_style_object_initializer = true:suggestion
27+
dotnet_style_collection_initializer = true:suggestion
28+
dotnet_style_coalesce_expression = true:suggestion
29+
dotnet_style_null_propagation = true:suggestion
30+
dotnet_style_explicit_tuple_names = true:suggestion
31+
32+
# CSharp code style settings:
33+
[*.cs]
34+
# Prefer "var" everywhere
35+
csharp_style_var_for_built_in_types = true:warn
36+
csharp_style_var_when_type_is_apparent = true:warn
37+
csharp_style_var_elsewhere = true:warn
38+
39+
# Prefer method-like constructs to have a block body
40+
csharp_style_expression_bodied_methods = true:warn
41+
csharp_style_expression_bodied_constructors = false:suggestion
42+
csharp_style_expression_bodied_operators = true:warn
43+
44+
# Prefer property-like constructs to have an expression-body
45+
csharp_style_expression_bodied_properties = true:warn
46+
csharp_style_expression_bodied_indexers = true:warn
47+
csharp_style_expression_bodied_accessors = true:warn
48+
49+
# Suggest more modern language features when available
50+
csharp_style_pattern_matching_over_is_with_cast_check = true:warn
51+
csharp_style_pattern_matching_over_as_with_null_check = true:warn
52+
csharp_style_inlined_variable_declaration = true:warn
53+
csharp_style_throw_expression = true:warn
54+
csharp_style_conditional_delegate_call = true:warn
55+
56+
# Newline settings
57+
csharp_new_line_before_open_brace = all
58+
csharp_new_line_before_else = true
59+
csharp_new_line_before_catch = true
60+
csharp_new_line_before_finally = true
61+
csharp_new_line_before_members_in_object_initializers = true
62+
csharp_new_line_before_members_in_anonymous_types = true

.gitattributes

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

0 commit comments

Comments
 (0)