File tree Expand file tree Collapse file tree 6 files changed +43
-15
lines changed Expand file tree Collapse file tree 6 files changed +43
-15
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ LIB_FILES2=""
10
10
CURRENT_CONFIGURATION=" ./current-test-configuration"
11
11
OPTION=0
12
12
async_generator_path=" "
13
+ async_generator_version=" "
13
14
14
15
if [ ! -f $BUILD_TOOL_PATH ]
15
16
then
@@ -177,7 +178,7 @@ generateAsync(){
177
178
178
179
getAsyncGeneratorPath
179
180
cd src
180
- dotnet ../ " $async_generator_path "
181
+ dotnet " $async_generator_path "
181
182
cd ..
182
183
183
184
mainMenu
@@ -191,19 +192,15 @@ getAsyncGeneratorPath(){
191
192
192
193
cd Tools
193
194
194
- if [ ! -f nuget.exe ]
195
- then
196
- wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
197
- fi
198
-
199
- async_generator_path=" CSharpAsyncGenerator.CommandLine.$( cat packages.config | grep id=\" CSharpAsyncGenerator.CommandLine | cut -d\" -f4) /tools"
195
+ async_generator_version=" $( cat packages.csproj | grep Include=\" CSharpAsyncGenerator.CommandLine | cut -d\" -f4) "
196
+ async_generator_path=" $HOME /.nuget/packages/csharpasyncgenerator.commandline/$async_generator_version /tools"
200
197
201
198
if [ ! -d $async_generator_path ]
202
199
then
203
- mono nuget.exe install
200
+ dotnet restore " ./packages.csproj "
204
201
fi
205
202
206
- async_generator_path=" Tools/ $async_generator_path /netcoreapp2.1/AsyncGenerator.CommandLine.dll"
203
+ async_generator_path=" $async_generator_path /netcoreapp2.1/AsyncGenerator.CommandLine.dll"
207
204
cd ..
208
205
}
209
206
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ vswhere.*
4
4
CSharpAsyncGenerator.CommandLine. *
5
5
gitreleasemanager. *
6
6
SQLitePCLRaw.core. *
7
+ obj /
Original file line number Diff line number Diff line change 7
7
<package id =" NUnit.Extension.NUnitV2ResultWriter" version =" 3.6.0" targetFramework =" net461" />
8
8
<package id =" NUnit.Extension.TeamCityEventListener" version =" 1.0.6" targetFramework =" net461" />
9
9
<package id =" NUnit.Extension.VSProjectLoader" version =" 3.8.0" targetFramework =" net461" />
10
- <package id =" CSharpAsyncGenerator.CommandLine" version =" 0.16.2" targetFramework =" net461" />
11
10
<package id =" vswhere" version =" 2.1.4" targetFramework =" net461" />
12
11
<package id =" GitReleaseManager" version =" 0.7.0" targetFramework =" net461" />
13
12
</packages >
Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+
3
+ <PropertyGroup >
4
+ <TargetFramework >netcoreapp2.1</TargetFramework >
5
+ </PropertyGroup >
6
+
7
+ <ItemGroup >
8
+ <Compile Remove =" **\*" />
9
+ <EmbeddedResource Remove =" **\*" />
10
+ <None Remove =" **\*" />
11
+ </ItemGroup >
12
+
13
+ <ItemGroup >
14
+ <PackageReference Include =" CSharpAsyncGenerator.CommandLine" Version =" 0.16.2" />
15
+ </ItemGroup >
16
+
17
+ </Project >
Original file line number Diff line number Diff line change 45
45
</exec >
46
46
</target >
47
47
48
+ <target name =" common.tools-restore" depends =" common.init" >
49
+ <exec workingdir =" ${root.dir}/Tools" program =" dotnet" verbose =" true" >
50
+ <arg line =" restore ./packages.csproj" />
51
+ </exec >
52
+ </target >
53
+
48
54
</project >
Original file line number Diff line number Diff line change 54
54
</exec >
55
55
</target >
56
56
57
+ <target name =" get-tool-path" depends =" common.tools-restore" >
58
+ <xmlpeek
59
+ file=" ${tools.dir}/packages.csproj"
60
+ xpath=" /Project/ItemGroup/PackageReference[@Include = '${tool-id}']/@Version"
61
+ property=" tool-version" />
62
+ <property name =" tool-path" value =" ${environment::get-folder-path('UserProfile')}/.nuget/packages/${tool-id}/${tool-version}/" />
63
+ </target >
64
+
57
65
<target name =" get-nuget-package-path" depends =" common.nuget-restore" >
58
66
<xmlpeek
59
67
file=" ${tools.dir}/packages.config"
63
71
</target >
64
72
65
73
<target name =" find-async-generator-console" >
66
- <property name =" nuget-package -id" value =" CSharpAsyncGenerator.CommandLine" />
67
- <call target =" get-nuget-package -path" />
68
- <property name =" async-generator-console" value =" ${nuget-package -path}/tools/netcoreapp2.1/AsyncGenerator.CommandLine.dll" />
74
+ <property name =" tool -id" value =" CSharpAsyncGenerator.CommandLine" />
75
+ <call target =" get-tool -path" />
76
+ <property name =" async-generator-console" value =" ${tool -path}/tools/netcoreapp2.1/AsyncGenerator.CommandLine.dll" />
69
77
</target >
70
78
71
- <target name =" generate-async" depends =" common.nuget-restore solution-restore find-async-generator-console" >
79
+ <target name =" generate-async" depends =" solution-restore find-async-generator-console" >
72
80
<exec workingdir =" ${root.dir}/src" program =" dotnet" verbose =" true" >
73
- <arg line =" . ${async-generator-console}" />
81
+ <arg line =" ${async-generator-console}" />
74
82
</exec >
75
83
</target >
76
84
You can’t perform that action at this time.
0 commit comments