Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/runceel/Livet
Browse files Browse the repository at this point in the history
  • Loading branch information
runceel committed Jun 15, 2020
2 parents 5fd3baf + ee57c0b commit ec009b9
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 21 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Release

on:
push:
branches: [ master, pre-release, release ]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Update version number
if: github.ref != 'refs/heads/release'
shell: pwsh
run: |
$doc = [XML](Get-Content 'Livet.props')
$doc.Project.PropertyGroup.PackageVersion = $doc.Project.PropertyGroup.Version
$doc.Project.PropertyGroup.PackageVersion += '-pre' + (Get-Date).ToString("yyyyMMddHHmm")
$doc.Save('Livet.props')
- name: Install dependencies
run: dotnet restore Livet.Code.sln
- name: Package
run: |
dotnet build Livet.Code.sln -p:Configuration=Release -p:Platform="Any CPU"
dotnet pack Livet.Code.sln -p:Configuration=Release -p:Platform="Any CPU"
- name: Test
run: dotnet test Livet.Test\Livet.Test.csproj --verbosity normal
- name: Copy package files
run: |
mkdir dist
Copy-Item (Get-ChildItem -Path "**/Livet*.nupkg" -Recurse) -Destination dist
Copy-Item (Get-ChildItem -Path "**/Livet*.snupkg" -Recurse) -Destination dist
shell: pwsh
- name: Archive NuGet packages
uses: actions/upload-artifact@v1
with:
name: dist
path: dist

release-to-nuget:
runs-on: windows-latest
needs: [build]
if: github.event_name == 'push' && (github.ref == 'refs/heads/pre-release' || github.ref == 'refs/heads/release')
steps:
- name: Download archives
uses: actions/download-artifact@v2
with:
name: dist
- name: Publish packages
run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.NUGET_APIKEY }} -s https://api.nuget.org/v3/index.json
2 changes: 1 addition & 1 deletion Livet.Test/Livet.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ConcurrentGarbageCollection>false</ConcurrentGarbageCollection>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<IsPackable>false</IsPackable>
<RootNamespace>Livet.NUnit</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion Livet.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>3.2.2.2</Version>
<Version>3.2.3</Version>
<PackageVersion>$(Version)</PackageVersion>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions LivetCask.Behaviors/LivetCask.Behaviors.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.SDK.WindowsDesktop">
<Import Project="..\Livet.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<RootNamespace>Livet.Behaviors</RootNamespace>
<AssemblyName>Livet.Behaviors</AssemblyName>
Expand All @@ -10,7 +10,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later and .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later and .NET Core 3.1, and licensed as zlib/libpng.
This package is for useful behaviors for MVVM pattern.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions LivetCask.Collections/LivetCask.Collections.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.SDK.WindowsDesktop">
<Import Project="..\Livet.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<RootNamespace>Livet.Collections</RootNamespace>
<AssemblyName>Livet.Collections</AssemblyName>
Expand All @@ -10,7 +10,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later and .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later and .NET Core 3.1, and licensed as zlib/libpng.
This package is for basic collections for MVVM pattern.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions LivetCask.Converters/LivetCask.Converters.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Livet.props" />

<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<RootNamespace>Livet.Converters</RootNamespace>
<AssemblyName>Livet.Converters</AssemblyName>
Expand All @@ -11,7 +11,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later and .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later and .NET Core 3.1, and licensed as zlib/libpng.
This package is for useful converters for MVVM pattern.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion LivetCask.Core/LivetCask.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later and .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later and .NET Core 3.1, and licensed as zlib/libpng.
This package is for core features for Livet.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion LivetCask.EventListeners/LivetCask.EventListeners.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later and .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later and .NET Core 3.1, and licensed as zlib/libpng.
This package is for useful event listeners using weak event pattern for MVVM pattern.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion LivetCask.Extensions/LivetCask.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Livet.props" />

<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>Livet</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<Compile Include="$(MSBuildThisFileDirectory)ColumnSpaceDistributionAndBooleanConverter.generated.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CompressionOptionAndBooleanConverter.generated.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ContentRightAndBooleanConverter.generated.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CursorTypeAndBooleanConverter.generated.cs" />
<Compile Include="$(MSBuildThisFileDirectory)D3DResourceTypeAndBooleanConverter.generated.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DataGridClipboardCopyModeAndBooleanConverter.generated.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DataGridEditActionAndBooleanConverter.generated.cs" />
Expand Down
4 changes: 2 additions & 2 deletions LivetCask.Messaging/LivetCask.Messaging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Livet.Annotations\Livet.Annotations.projitems" Label="Shared" />
<Import Project="..\Livet.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<RootNamespace>Livet</RootNamespace>
<AssemblyName>Livet.Messaging</AssemblyName>
Expand All @@ -11,7 +11,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later and .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later and .NET Core 3.1, and licensed as zlib/libpng.
This package is for useful messaging features between View layer and ViewModel layer for MVVM pattern.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions LivetCask.Mvvm/LivetCask.Mvvm.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Import Project="..\Livet.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<RootNamespace>Livet</RootNamespace>
<AssemblyName>Livet.Mvvm</AssemblyName>
<PackageId>LivetCask.Mvvm</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Livet Project</Authors>
<Description>Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later, .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later, .NET Core 3.1, and licensed as zlib/libpng.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
<PackageLicenseFile>license-en.txt</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion LivetCask.StatefulModel/LivetCask.StatefulModel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later, .NET Core 3.0 and .NET Standard 2.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later, .NET Core 3.1 and .NET Standard 2.0, and licensed as zlib/libpng.
This package is for useful collections for MVVM pattern.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions LivetCask/LivetCask.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Import Project="..\Livet.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<RootNamespace>Livet</RootNamespace>
<AssemblyName>Livet</AssemblyName>
<PackageId>LivetCask</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Livet Project</Authors>
<Description>Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later, .NET Core 3.0, and licensed as zlib/libpng.
It supports .NET Framework 4.5.2 or later, .NET Core 3.1, and licensed as zlib/libpng.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
<PackageLicenseFile>license-en.txt</PackageLicenseFile>
Expand Down
4 changes: 2 additions & 2 deletions LivetCask2/LivetCask2.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Import Project="..\Livet.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<UseWpf>true</UseWpf>
<RootNamespace>Livet</RootNamespace>
<AssemblyName>Livet</AssemblyName>
Expand All @@ -10,7 +10,7 @@
<Authors>Livet Project</Authors>
<Description>
Livet is the infrastructure of MVVM pattern on WPF.
It supports .NET Framework 4.5.2 or later, .NET Core 3.0, and licensed as zlib/libpng. If you would like to use LivetCask.StatefulModel instead of LivetCask.Collections, then please use LivetCask2 instead of LivetCask.
It supports .NET Framework 4.5.2 or later, .NET Core 3.1, and licensed as zlib/libpng. If you would like to use LivetCask.StatefulModel instead of LivetCask.Collections, then please use LivetCask2 instead of LivetCask.
</Description>
<Copyright>Copyright (c) 2010-2019 Livet Project</Copyright>
<PackageLicenseFile>license-en.txt</PackageLicenseFile>
Expand Down
7 changes: 7 additions & 0 deletions LivetEnumAndBooleanConverterGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Reflection;
using System.Text;
using System.Windows;
using System.Windows.Input;

namespace LivetEnumAndBooleanConverterGenerator
{
Expand All @@ -12,6 +13,11 @@ internal class Program
// ReSharper disable once UnusedParameter.Local
private static void Main(string[] args)
{
var excludeTypes = new[]
{
typeof(CursorType),
};

var assemblies =
new[]
{
Expand All @@ -37,6 +43,7 @@ private static void Main(string[] args)

var enumsT4 = assemblies.SelectMany(a => a?.GetTypes())
.Where(t => t != null && t.IsEnum && t.IsPublic)
.Where(x => !excludeTypes.Contains(x))
.Select(t => new EnumToBooleanConverter {TypeName = t.Name, EnumMemberNames = t.GetEnumNames()});

if (!Directory.Exists("Output")) Directory.CreateDirectory("Output");
Expand Down

0 comments on commit ec009b9

Please sign in to comment.