Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rc/0.0.2 #694

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ end_of_line = lf
# https://developercommunity.visualstudio.com/t/BUG:-editorconfig-trim_trailing_whitespa/953937?space=8&q=trim_trailing_whitespace
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_style = space
indent_size = 2
ij_xml_space_inside_empty_tag = true


[*.cs] # To match existing style
Expand Down
86 changes: 86 additions & 0 deletions BuildScripts/update-version.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
$Path = "$( $PSScriptRoot )/version.txt"
$values = Get-Content $Path | Out-String | ConvertFrom-StringData
#$values.Version
#$values.Package

$projects = @(
"QueryBuilder",
"SqlKata.Execution"
)

Function UpdateVersion($csprojPath)
{
"File: " + $csprojPath | Write-Host
[xml]$xml = Get-Content $csprojPath

if ($xml.Project.PropertyGroup.GetType().ToString() -eq "System.Xml.XmlElement")
{
$group = $xml.Project.PropertyGroup
}
else
{
$group = $xml.Project.PropertyGroup[0]
}

if ($null -ne $group.Version -and !$values.Package.equals($group.Version))
{
"Version: " + $group.Version + " -> " + $values.Package | Write-Host
$group.Version = $values.Package
}

if ($null -ne $group.AssemblyVersion -and !$values.Version.equals($group.AssemblyVersion))
{
"AssemblyVersion: " + $group.AssemblyVersion + " -> " + $values.Version | Write-Host
$group.AssemblyVersion = $values.Version
}

if ($null -ne $group.FileVersion -and !$values.Version.equals($group.FileVersion))
{
"FileVersion: " + $group.FileVersion + " -> " + $values.Version | Write-Host
$group.FileVersion = $values.Version
}

if ($null -ne $group.Copyright)
{
$group.Copyright = "OptimaJet Workflow Engine " + (Get-Date).Year
}

if ($null -ne $group.Product)
{
$group.Product = "Data Engine"
}

$PackageReference = $xml.Project.ItemGroup.PackageReference

foreach ($package in $PackageReference)
{
if ($null -eq $package.Include -and $null -eq $package.Version)
{
continue;
}

$packName = $package.Include.ToString()
$packVersion = $package.Version.ToString()

foreach ($project in $projects)
{
if ($packName.equals($project) -and !$packVersion.equals($values.Package))
{
$packName + " " + $packVersion + " -> " + $values.Package | Write-Host
$package.Version = $values.Package
break
}
}
}

$xml.Save($csprojPath);
"Saved: " + $csprojPath | Write-Host
}

"Updating projects" | Write-Host
"---------------------------------------" | Write-Host

foreach ($project in $projects)
{
UpdateVersion([IO.Path]::Combine($PSScriptRoot, "..", $project, $project + ".csproj"))
}
2 changes: 2 additions & 0 deletions BuildScripts/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Version=0.0.2
Package=0.0.2
1 change: 1 addition & 0 deletions Program/AssemblyManifest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[assembly: Fody.ConfigureAwait(false)]
3 changes: 3 additions & 0 deletions Program/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>
30 changes: 30 additions & 0 deletions Program/FodyWeavers.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
12 changes: 10 additions & 2 deletions Program/Program.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Fody" Version="6.6.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Npgsql" Version="4.0.4" />
<PackageReference Include="System.Data.SqlClient" Version="4.5.1" />
<PackageReference Include="System.Data.SQLite" Version="1.0.109.2" />
Expand All @@ -15,7 +22,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions QueryBuilder.Tests/AssemblyManifest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[assembly: Fody.ConfigureAwait(false)]
3 changes: 3 additions & 0 deletions QueryBuilder.Tests/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>
30 changes: 30 additions & 0 deletions QueryBuilder.Tests/FodyWeavers.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
Loading