-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
158 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ on: | |
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
@@ -16,8 +14,8 @@ jobs: | |
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: | | ||
5.0.x | ||
6.0.x | ||
7.0.x | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ jobs: | |
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: | | ||
5.0.x | ||
6.0.x | ||
7.0.x | ||
include-prerelease: true | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
function Get-ScriptFolder() { | ||
$fp = $PSScriptRoot | ||
|
||
if ($fp) { | ||
return $fp | ||
} | ||
|
||
return $(split-path -parent $MyInvocation.MyCommand.Definition) | ||
} | ||
|
||
function New-TemporaryDirectory { | ||
$parent = [System.IO.Path]::GetTempPath() | ||
[string] $name = [System.Guid]::NewGuid() | ||
[string] $path = Join-Path $parent $name | ||
New-Item -ItemType Directory -Path $path | Out-Null | ||
|
||
return $path | ||
} | ||
|
||
function Extract-Zip($ArchivePath, $TargetDirectory) { | ||
Add-Type -Assembly "System.IO.Compression.Filesystem" | ||
$ar = [System.IO.Compression.ZipFile]::OpenRead($tempFile.FullName) | ||
|
||
$ar.Entries | ? { $_.Name -ne "" } | % { | ||
$entry = $_ | ||
|
||
$directory = Split-Path $entry.FullName | ||
$fullTargetDirectory = Join-Path $TargetDirectory $directory | ||
|
||
New-Item -ItemType Directory $fullTargetDirectory -Force | Out-Null | ||
|
||
$fullTargetFilePath = Join-Path $fullTargetDirectory $entry.Name | ||
|
||
Write-Debug "Extracting $($entry.Name) to $fullTargetFilePath" | ||
|
||
$stream = New-Object -TypeName System.IO.FileStream -ArgumentList @($fullTargetFilePath, [System.IO.FileMode]::OpenOrCreate) | ||
|
||
$entryStream = $entry.Open() | ||
|
||
$entryStream.CopyTo($stream) | ||
|
||
$stream.Close() | ||
$entryStream.Close() | ||
} | ||
|
||
$ar.Dispose() | ||
|
||
} | ||
|
||
function Extract-Config($TargetDirectory) { | ||
$tempFile = New-TemporaryFile | ||
$tempFolder = New-TemporaryDirectory | ||
|
||
try { | ||
$url = 'https://github.com/Gitii/config/archive/refs/heads/main.zip' | ||
|
||
Write-Host "Downloading..." | ||
Invoke-WebRequest -Uri $url -OutFile $tempFile.FullName | ||
|
||
Write-Host "Extracting to $tempFolder..." | ||
Extract-Zip -ArchivePath $tempFile.FullName -TargetDirectory $tempFolder | ||
|
||
$templateFolder = Join-Path $tempFolder "config-main" "templates" | ||
|
||
Write-Host "Copying templates to $TargetDirectory" | ||
Get-ChildItem -Path $templateFolder -Force | Copy-Item -Recurse -Destination $TargetDirectory -Force | ||
|
||
} finally { | ||
$tempFile.Delete() | ||
|
||
Remove-Item $tempFolder -Recurse -Force | ||
} | ||
} | ||
|
||
$targetDir = Get-Location | ||
|
||
Extract-Config -TargetDirectory $targetDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
function Get-ScriptFolder() { | ||
$fp = $PSScriptRoot | ||
|
||
if ($fp) { | ||
return $fp | ||
} | ||
|
||
return $(split-path -parent $MyInvocation.MyCommand.Definition) | ||
} | ||
|
||
$currDir = Get-ScriptFolder | ||
|
||
& "$currDir/bootstrap.ps1" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
[*.cs] | ||
command = dotnet | ||
arguments = csharpier "{file}" | ||
always_run = true | ||
|
||
[*.{js,ts,css,less,scss,vue,json,gql,md,yml,yaml,html,htm}] | ||
command = dotnet | ||
arguments = pprettier --write "{file}" | ||
always_run = true | ||
|
||
[*.{xml,csproj,xaml,appxmanifest,props,wapproj}] | ||
command = dotnet | ||
arguments = pprettier --write "{file}" --plugin "<NodeModulesPath>/@prettier/plugin-xml" --parser "xml" --print-width 120 --xml-whitespace-sensitivity "ignore" --tab-width 4 | ||
always_run = true | ||
|
||
[*.sh] | ||
command = dotnet | ||
arguments = pprettier --write "{file}" --plugin "<NodeModulesPath>/prettier-plugin-sh" | ||
always_run = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 10 additions & 6 deletions
16
Community.Sextant.WinUI.Tests/Community.Sextant.WinUI.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<LangVersion>latest</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild> | ||
<EnableNETAnalyzers>True</EnableNETAnalyzers> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Meziantou.Analyzer" Version="1.0.688"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.0.64"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="AsyncFixer" Version="1.5.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<LangVersion>latest</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild> | ||
<EnableNETAnalyzers>True</EnableNETAnalyzers> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.14"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="AsyncFixer" Version="1.6.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters