Skip to content

Commit

Permalink
Migrate to NiceIO package
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbilas committed Nov 16, 2023
1 parent 2ad4a50 commit 82d54dc
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 28 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish NuGet Package
on:
workflow_dispatch:
push:
tags: [ 'release-*' ]
tags: [ release-* ]

# TODO: trigger on commit desc '/publish'
# TODO: switch to https://github.com/xoofx/dotnet-releaser
Expand All @@ -15,13 +15,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: '7.0.x'
dotnet-version: 7.0.x

- name: Build for publish
run: dotnet publish -c Release
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
name: Validate Dev Branch

on:
workflow_dispatch:
push:
branches: [ 'dev' ]
branches: [ dev ]

jobs:
validate:
runs-on: windows-latest

steps:
- name: Checkout + submodules
- name: Checkout
uses: actions/checkout@v4.1.1
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: '7.0.x'
dotnet-version: 7.0.x

# https://stackoverflow.com/a/70552262/14582
- name: Run tests
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<PackageVersion Include="DotNetConfig" Version="1.0.6" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="7.0.0" />
<PackageVersion Include="Microsoft.PowerShell.SDK" Version="7.3.6" />
<PackageVersion Include="OkTools.NiceIO" Version="1.0.1" />
<PackageVersion Include="PInvoke.Kernel32" Version="0.7.124" />
<PackageVersion Include="PInvoke.NTDll" Version="0.7.124" />
<PackageVersion Include="Spectre.Console" Version="0.47.0" />
Expand Down
1 change: 0 additions & 1 deletion external/NiceIO
Submodule NiceIO deleted from 464ae5
17 changes: 5 additions & 12 deletions src/Core/Core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup><OkFeatures>T4</OkFeatures></PropertyGroup>
<Import Project="$(OkTargetsRoot)Library.targets" />

Expand All @@ -7,19 +7,9 @@
<RootNamespace>OkTools.Core</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591</NoWarn>
<DefineConstants>$(DefineConstants);NICEIO_PUBLIC;NICEIO_OKTOOLS</DefineConstants>
<DefineConstants>$(DefineConstants);NICEIO_PUBLIC</DefineConstants>
</PropertyGroup>

<ItemGroup>
<!--
TODO: move NiceIO to a new external folder that has overrides for directory props etc. that skips the defaulting we get from the root
alternate: see if we can move those files to src\
-->
<Compile Include="$(OkRoot)external\NiceIO\*.cs">
<Link>NiceIO\%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>

<!-- nuget -->
<PropertyGroup>
<GeneratePackageOnBuild>$(_IsPublishing)</GeneratePackageOnBuild>
Expand All @@ -37,6 +27,9 @@
<ItemGroup>
<PackageReference Include="PInvoke.Kernel32" />
<PackageReference Include="PInvoke.NTDll" />

<PackageReference Include="OkTools.NiceIO" />
<PreprocessorValue Include="NICEIO_NAMESPACE" Value="OkTools.Core" Visible="false" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion src/Unity/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Sure would be nice to have a "CLI Helper" nuget that does all kinds of useful te
* Do everything with sourcegen support so we get type safety, autocomplete, self-documenting (easy schema gen)
* Dumping abilities including to JSON and YAML
* Efficient subprocess launching and stdin/out/err routing
* NiceIO++
* Logging w/ rotation
* VCS-awareness

Expand Down
1 change: 0 additions & 1 deletion src/_Include/Update.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion targets/Tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</ItemGroup>

<PropertyGroup>
<OkFeatures>$(OkFeatures);Core;NiceIO;Tests</OkFeatures>
<OkFeatures>$(OkFeatures);Core;Tests</OkFeatures>
</PropertyGroup>
<Import Project="Library.targets" />

Expand Down

0 comments on commit 82d54dc

Please sign in to comment.