Skip to content

Commit

Permalink
Upgrade AsyncGenerator to 0.19.1 (#2605)
Browse files Browse the repository at this point in the history
  • Loading branch information
maca88 authored Nov 19, 2020
1 parent a58c98d commit 58e3cb2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 33 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"csharpasyncgenerator.tool": {
"version": "0.19.1",
"commands": [
"async-generator"
]
}
}
}
27 changes: 3 additions & 24 deletions ShowBuildMenu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,36 +178,15 @@ testRun(){
}

generateAsync(){
dotnet restore ./src/NHibernate.sln

getAsyncGeneratorPath
cd src
dotnet ../"$async_generator_path"
dotnet tool restore
dotnet restore ./NHibernate.sln
dotnet async-generator
cd ..

mainMenu
}

getAsyncGeneratorPath(){
if [ "$async_generator_path" ]
then
return
fi

cd Tools

async_generator_version="$(cat packages.csproj | grep Include=\"CSharpAsyncGenerator.CommandLine | cut -d\" -f4)"
async_generator_path="csharpasyncgenerator.commandline/$async_generator_version/tools"

if [ ! -d $async_generator_path ]
then
dotnet restore "./packages.csproj" --packages .
fi

async_generator_path="Tools/$async_generator_path/netcoreapp2.1/AsyncGenerator.CommandLine.dll"
cd ..
}

mainMenu() {
echo "========================= NHIBERNATE BUILD MENU =========================="
echo "--- TESTING ---"
Expand Down
1 change: 0 additions & 1 deletion Tools/packages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSharpAsyncGenerator.CommandLine" Version="0.18.2" />
<PackageReference Include="vswhere" Version="2.1.4" />
<PackageReference Include="NUnit.Console" Version="3.10.0" />
<PackageReference Include="GitReleaseManager" Version="0.11.0" />
Expand Down
3 changes: 3 additions & 0 deletions build-common/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
</target>

<target name="common.tools-restore" depends="common.init">
<exec workingdir="${root.dir}" program="dotnet" verbose="true">
<arg line="tool restore" />
</exec>
<exec workingdir="${root.dir}/Tools" program="dotnet" verbose="true">
<arg line="restore ./packages.csproj --packages ." />
</exec>
Expand Down
10 changes: 2 additions & 8 deletions default.build
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,9 @@
<property name="tool.path" value="${tools.dir}/${tool.id}/${tool.version}/" />
</target>

<target name="find-async-generator-console">
<property name="tool.id" value="CSharpAsyncGenerator.CommandLine" />
<call target="get-tool-info" />
<property name="async-generator-console" value="${tool.path}tools/netcoreapp2.1/AsyncGenerator.CommandLine.dll" />
</target>

<target name="generate-async" depends="solution-restore find-async-generator-console">
<target name="generate-async" depends="solution-restore">
<exec workingdir="${root.dir}/src" program="dotnet" verbose="true">
<arg line=".${async-generator-console}" />
<arg line="async-generator" />
</exec>
</target>

Expand Down

0 comments on commit 58e3cb2

Please sign in to comment.