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

Upgrade AsyncGenerator to 0.19.1 #2605

Merged
merged 3 commits into from
Nov 19, 2020
Merged
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
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