Skip to content

Commit 27dd328

Browse files
authored
Merge pull request #4 from NgrDavid/main
Common CI/CD and repository layout
2 parents 09eaec7 + ec4fa0a commit 27dd328

Some content is hidden

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

53 files changed

+855
-79
lines changed

.bonsai/Bonsai.config

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<PackageConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<Packages>
4+
<Package id="Bonsai" version="2.8.5" />
5+
<Package id="Bonsai.Core" version="2.8.5" />
6+
<Package id="Bonsai.Design" version="2.8.5" />
7+
<Package id="Bonsai.Editor" version="2.8.5" />
8+
<Package id="jacobslusser.ScintillaNET" version="3.6.3" />
9+
<Package id="Markdig" version="0.18.1" />
10+
<Package id="Microsoft.Web.WebView2" version="1.0.1823.32" />
11+
<Package id="Rx-Core" version="2.2.5" />
12+
<Package id="Rx-Interfaces" version="2.2.5" />
13+
<Package id="Rx-Linq" version="2.2.5" />
14+
<Package id="Rx-PlatformServices" version="2.2.5" />
15+
<Package id="SvgNet" version="3.3.3" />
16+
<Package id="System.Buffers" version="4.5.1" />
17+
<Package id="System.Memory" version="4.5.5" />
18+
<Package id="System.Numerics.Vectors" version="4.5.0" />
19+
<Package id="System.Resources.Extensions" version="8.0.0" />
20+
<Package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" />
21+
<Package id="YamlDotNet" version="13.1.1" />
22+
</Packages>
23+
<AssemblyReferences>
24+
<AssemblyReference assemblyName="Bonsai" />
25+
<AssemblyReference assemblyName="Bonsai.Core" />
26+
<AssemblyReference assemblyName="Bonsai.Design" />
27+
<AssemblyReference assemblyName="Bonsai.Editor" />
28+
</AssemblyReferences>
29+
<AssemblyLocations>
30+
<AssemblyLocation assemblyName="Bonsai" processorArchitecture="MSIL" location="Packages/Bonsai.2.8.5/lib/net48/Bonsai.exe" />
31+
<AssemblyLocation assemblyName="Bonsai.Core" processorArchitecture="MSIL" location="Packages/Bonsai.Core.2.8.5/lib/net462/Bonsai.Core.dll" />
32+
<AssemblyLocation assemblyName="Bonsai.Design" processorArchitecture="MSIL" location="Packages/Bonsai.Design.2.8.5/lib/net462/Bonsai.Design.dll" />
33+
<AssemblyLocation assemblyName="Bonsai.Editor" processorArchitecture="MSIL" location="Packages/Bonsai.Editor.2.8.5/lib/net472/Bonsai.Editor.dll" />
34+
<AssemblyLocation assemblyName="Markdig" processorArchitecture="MSIL" location="Packages/Markdig.0.18.1/lib/net40/Markdig.dll" />
35+
<AssemblyLocation assemblyName="Microsoft.Web.WebView2.Core" processorArchitecture="MSIL" location="Packages/Microsoft.Web.WebView2.1.0.1823.32/lib/net45/Microsoft.Web.WebView2.Core.dll" />
36+
<AssemblyLocation assemblyName="Microsoft.Web.WebView2.WinForms" processorArchitecture="MSIL" location="Packages/Microsoft.Web.WebView2.1.0.1823.32/lib/net45/Microsoft.Web.WebView2.WinForms.dll" />
37+
<AssemblyLocation assemblyName="Microsoft.Web.WebView2.Wpf" processorArchitecture="MSIL" location="Packages/Microsoft.Web.WebView2.1.0.1823.32/lib/net45/Microsoft.Web.WebView2.Wpf.dll" />
38+
<AssemblyLocation assemblyName="ScintillaNET" processorArchitecture="MSIL" location="Packages/jacobslusser.ScintillaNET.3.6.3/lib/net40/ScintillaNET.dll" />
39+
<AssemblyLocation assemblyName="SVG" processorArchitecture="MSIL" location="Packages/SvgNet.3.3.3/lib/net462/SVG.dll" />
40+
<AssemblyLocation assemblyName="System.Buffers" processorArchitecture="MSIL" location="Packages/System.Buffers.4.5.1/lib/net461/System.Buffers.dll" />
41+
<AssemblyLocation assemblyName="System.Memory" processorArchitecture="MSIL" location="Packages/System.Memory.4.5.5/lib/net461/System.Memory.dll" />
42+
<AssemblyLocation assemblyName="System.Numerics.Vectors" processorArchitecture="MSIL" location="Packages/System.Numerics.Vectors.4.5.0/lib/net46/System.Numerics.Vectors.dll" />
43+
<AssemblyLocation assemblyName="System.Reactive.Core" processorArchitecture="MSIL" location="Packages/Rx-Core.2.2.5/lib/net45/System.Reactive.Core.dll" />
44+
<AssemblyLocation assemblyName="System.Reactive.Interfaces" processorArchitecture="MSIL" location="Packages/Rx-Interfaces.2.2.5/lib/net45/System.Reactive.Interfaces.dll" />
45+
<AssemblyLocation assemblyName="System.Reactive.Linq" processorArchitecture="MSIL" location="Packages/Rx-Linq.2.2.5/lib/net45/System.Reactive.Linq.dll" />
46+
<AssemblyLocation assemblyName="System.Reactive.PlatformServices" processorArchitecture="MSIL" location="Packages/Rx-PlatformServices.2.2.5/lib/net45/System.Reactive.PlatformServices.dll" />
47+
<AssemblyLocation assemblyName="System.Resources.Extensions" processorArchitecture="MSIL" location="Packages/System.Resources.Extensions.8.0.0/lib/net462/System.Resources.Extensions.dll" />
48+
<AssemblyLocation assemblyName="System.Runtime.CompilerServices.Unsafe" processorArchitecture="MSIL" location="Packages/System.Runtime.CompilerServices.Unsafe.4.5.3/lib/net461/System.Runtime.CompilerServices.Unsafe.dll" />
49+
<AssemblyLocation assemblyName="YamlDotNet" processorArchitecture="MSIL" location="Packages/YamlDotNet.13.1.1/lib/net47/YamlDotNet.dll" />
50+
</AssemblyLocations>
51+
<LibraryFolders>
52+
<LibraryFolder path="Packages/Microsoft.Web.WebView2.1.0.1823.32/runtimes/win-arm64/native" platform="arm64" />
53+
<LibraryFolder path="Packages/Microsoft.Web.WebView2.1.0.1823.32/runtimes/win-arm64/native_uap" platform="arm64" />
54+
<LibraryFolder path="Packages/Microsoft.Web.WebView2.1.0.1823.32/runtimes/win-x64/native" platform="x64" />
55+
<LibraryFolder path="Packages/Microsoft.Web.WebView2.1.0.1823.32/runtimes/win-x64/native_uap" platform="x64" />
56+
<LibraryFolder path="Packages/Microsoft.Web.WebView2.1.0.1823.32/runtimes/win-x86/native" platform="x86" />
57+
<LibraryFolder path="Packages/Microsoft.Web.WebView2.1.0.1823.32/runtimes/win-x86/native_uap" platform="x86" />
58+
</LibraryFolders>
59+
</PackageConfiguration>

.bonsai/NuGet.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
</packageSources>
5+
</configuration>

.bonsai/Setup.cmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
pushd %~dp0
3+
powershell -ExecutionPolicy Bypass -File ./Setup.ps1
4+
popd

.bonsai/Setup.ps1

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Push-Location $PSScriptRoot
2+
if (!(Test-Path "./Bonsai.exe")) {
3+
$release = "https://github.com/bonsai-rx/bonsai/releases/latest/download/Bonsai.zip"
4+
$configPath = "./Bonsai.config"
5+
if (Test-Path $configPath) {
6+
[xml]$config = Get-Content $configPath
7+
$bootstrapper = $config.PackageConfiguration.Packages.Package.where{$_.id -eq 'Bonsai'}
8+
if ($bootstrapper) {
9+
$version = $bootstrapper.version
10+
$release = "https://github.com/bonsai-rx/bonsai/releases/download/$version/Bonsai.zip"
11+
}
12+
}
13+
Invoke-WebRequest $release -OutFile "temp.zip"
14+
Move-Item -Path "NuGet.config" "temp.config" -ErrorAction SilentlyContinue
15+
Expand-Archive "temp.zip" -DestinationPath "." -Force
16+
Move-Item -Path "temp.config" "NuGet.config" -Force -ErrorAction SilentlyContinue
17+
Remove-Item -Path "temp.zip"
18+
Remove-Item -Path "Bonsai32.exe"
19+
}
20+
& .\Bonsai.exe --no-editor
21+
Pop-Location

.config/dotnet-tools.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"docfx": {
6+
"version": "2.78.3",
7+
"commands": [
8+
"docfx"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

.editorconfig

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,46 @@
1-
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
2-
###############################
3-
# Core EditorConfig Options #
4-
###############################
5-
# All files
1+
root = true
2+
63
[*]
74
indent_style = space
85

9-
# XML project files
10-
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj,wxs}]
6+
#--------------------------------------------------------------------------------------------------
7+
# XML, JSON, and web files
8+
#--------------------------------------------------------------------------------------------------
9+
[*.{xml,csproj,vcxproj,vcxproj.filters,shproj,props,targets,config,nuspec,resx,vsixmanifest,wxs,vstemplate,slnx}]
1110
indent_size = 2
1211

13-
# XML config files
14-
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vstemplate,vsct}]
12+
[*.json]
1513
indent_size = 2
1614

17-
# HTML / CSS files
1815
[*.{html,css}]
1916
indent_size = 2
2017

21-
# Code files
22-
[*.{cs,csx}]
18+
#--------------------------------------------------------------------------------------------------
19+
# C++
20+
#--------------------------------------------------------------------------------------------------
21+
[*.{c,cpp,h,hpp,ixx}]
2322
indent_size = 4
23+
charset = utf-8-bom
24+
trim_trailing_whitespace = true
2425
insert_final_newline = true
26+
27+
#--------------------------------------------------------------------------------------------------
28+
# C#
29+
#--------------------------------------------------------------------------------------------------
30+
[*.{cs,csx}]
31+
indent_size = 4
2532
charset = utf-8-bom
26-
###############################
27-
# .NET Coding Conventions #
28-
###############################
29-
[*.{cs}]
30-
# Organize usings
31-
dotnet_sort_system_directives_first = true
33+
trim_trailing_whitespace = true
34+
insert_final_newline = true
35+
36+
# Language keyword vs full type name
37+
# Predefined for members, etc does not create a message because the explicitly sized types are conveient in interop scenarios where the bit size matters.
38+
dotnet_style_predefined_type_for_locals_parameters_members = true:none
39+
dotnet_style_predefined_type_for_member_access = true:suggestion
40+
41+
# Instantiate argument exceptions correctly
42+
dotnet_diagnostic.CA2208.severity = warning
43+
44+
# Don't complain about not using modern collection syntax
45+
dotnet_style_prefer_collection_expression = never
46+
csharp_style_prefer_range_operator = false

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Config
99
*.gitignore text
1010
*.gitattributes text
11+
*.gitmodules text eol=lf
1112
*.editorconfig text
1213
*.git-blame-ignore-revs text
1314
*.sln text
@@ -38,4 +39,5 @@ LICENSE text
3839
# Graphics
3940
*.png binary
4041
*.ico binary
41-
*.svg text
42+
*.gif binary
43+
*.svg text

0 commit comments

Comments
 (0)