Skip to content

Commit 5ce4d9f

Browse files
authored
Merge pull request #3 from zjklee/feature/use-only-code-package
Use only code package with exposing `internal only`
2 parents fac93b6 + 5bc7efa commit 5ce4d9f

File tree

13 files changed

+21
-26
lines changed

13 files changed

+21
-26
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ jobs:
7575
run: git fetch --depth 500
7676
- name: Determine version
7777
run: echo "::set-env name=VERSION::$(git describe --tags --abbrev=0)"
78-
79-
- name: pack binary
80-
working-directory: ./src
81-
run: dotnet pack ./ExpressionShortcuts/ExpressionShortcuts.csproj -c Release /p:version=${{ env.VERSION }}.${{ github.run_number }}
82-
78+
8379
- name: pack code
8480
working-directory: ./src
8581
run: dotnet pack ./ExpressionShortcuts/ExpressionShortcuts.Source.csproj /p:version=${{ env.VERSION }}.${{ github.run_number }}

.github/workflows/Release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ jobs:
1818
- name: pack binary
1919
working-directory: ./src
2020
run: dotnet pack ./ExpressionShortcuts/ExpressionShortcuts.csproj -c Release /p:version=${{ github.event.release.tag_name }}
21-
22-
- name: pack binary
23-
working-directory: ./src
24-
run: dotnet pack ./ExpressionShortcuts/ExpressionShortcuts.Source.csproj /p:version=${{ github.event.release.tag_name }}
25-
21+
2622
- name: publish
2723
working-directory: ./src
2824
run: dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

src/ExpressionShortcuts/BlockBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Expressions.Shortcuts
88
/// <summary>
99
/// Shortcut for <see cref="BlockExpression"/>
1010
/// </summary>
11-
public class BlockBuilder: ExpressionContainer
11+
internal class BlockBuilder: ExpressionContainer
1212
{
1313
private readonly Type _returnType;
1414
private readonly List<Expression> _expressions;

src/ExpressionShortcuts/ConditionBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Expressions.Shortcuts
66
/// <summary>
77
///
88
/// </summary>
9-
public class ConditionBuilder : ExpressionContainer
9+
internal class ConditionBuilder : ExpressionContainer
1010
{
1111
private Expression _condition;
1212
private Expression _then;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using System.Runtime.CompilerServices;
2+
3+
[assembly: InternalsVisibleTo("ExpressionShortcuts.Tests")]

src/ExpressionShortcuts/ExpressionContainer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Expressions.Shortcuts
55
/// <summary>
66
/// Wrapper around of <see cref="System.Linq.Expressions.Expression"/> to provide addition functionality
77
/// </summary>
8-
public class ExpressionContainer
8+
internal class ExpressionContainer
99
{
1010
/// <summary>
1111
///
@@ -66,7 +66,7 @@ public class ExpressionContainer
6666
/// </summary>
6767
/// <remarks>Used to trick C# compiler in cases like <see cref="ExpressionShortcuts.Call"/> in order to pass value to target method.</remarks>
6868
/// <typeparam name="T">Type of expected <see cref="Expression"/> result value.</typeparam>
69-
public class ExpressionContainer<T> : ExpressionContainer
69+
internal class ExpressionContainer<T> : ExpressionContainer
7070
{
7171
/// <summary>
7272
/// Used to trick C# compiler

src/ExpressionShortcuts/ExpressionContainerExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace Expressions.Shortcuts
77
{
8-
public static partial class ExpressionShortcuts
8+
internal static partial class ExpressionShortcuts
99
{
1010
/// <summary>
1111
/// Creates strongly typed representation of the <see cref="Expression.Property(System.Linq.Expressions.Expression,System.String)"/>

src/ExpressionShortcuts/ExpressionShortcuts.Source.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
44

55
<PropertyGroup>
6-
<PackageId>ExpressionShortcuts.Source</PackageId>
6+
<PackageId>ExpressionShortcuts</PackageId>
77
<TargetFrameworks>net452;netstandard1.3;netstandard2.0</TargetFrameworks>
8-
<Version>1.1.22</Version>
8+
<Version>1.0.0</Version>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1010
<IsPackable>true</IsPackable>
1111
<Configuration>Source</Configuration>
@@ -50,17 +50,17 @@
5050
</ItemGroup>
5151

5252
<ItemGroup>
53-
<Compile Include="**\*.cs" Exclude="obj\**\*.*">
53+
<Compile Include="**\*.cs" Exclude="Exclude\**\*.*;obj\**\*.*">
5454
<Pack>true</Pack>
5555
<Visible>false</Visible>
5656
<PackagePath>$(ContentTargetFolders)\cs\netstandard2.0\$(PackageId)\%(Identity)</PackagePath>
5757
</Compile>
58-
<Compile Include="**\*.cs" Exclude="obj\**\*.*;netstandard2.0\**\*.cs">
58+
<Compile Include="**\*.cs" Exclude="Exclude\**\*.*;obj\**\*.*;netstandard2.0\**\*.cs">
5959
<Pack>true</Pack>
6060
<Visible>false</Visible>
6161
<PackagePath>$(ContentTargetFolders)\cs\netstandard1.3\$(PackageId)\%(Identity)</PackagePath>
6262
</Compile>
63-
<Compile Include="**\*.cs" Exclude="obj\**\*.*;netstandard2.0\**\*.cs">
63+
<Compile Include="**\*.cs" Exclude="Exclude\**\*.*;obj\**\*.*;netstandard2.0\**\*.cs">
6464
<Pack>true</Pack>
6565
<Visible>false</Visible>
6666
<PackagePath>$(ContentTargetFolders)\cs\net452\$(PackageId)\%(Identity)</PackagePath>

src/ExpressionShortcuts/ExpressionShortcuts.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Expressions.Shortcuts
99
/// <summary>
1010
/// Stands for <see cref="Expression"/> shortcuts.
1111
/// </summary>
12-
public static partial class ExpressionShortcuts
12+
internal static partial class ExpressionShortcuts
1313
{
1414
/// <summary>
1515
/// Creates strongly typed representation of the <paramref name="expression"/>

src/ExpressionShortcuts/ExpressionUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Expressions.Shortcuts
1010
/// <summary>
1111
///
1212
/// </summary>
13-
public static class ExpressionUtils
13+
internal static class ExpressionUtils
1414
{
1515
/// <summary>
1616
/// Visits <paramref name="expressions"/> and replaces <see cref="ParameterExpression"/> by <paramref name="newValues"/> performing match by <see cref="Expression.Type"/>

0 commit comments

Comments
 (0)