Skip to content

Commit 5542869

Browse files
TINKERPOP-2085 Remove dependency on mono for docfx (#2840)
--------- Co-authored-by: Stephen Mallette <[email protected]>
1 parent ca5414f commit 5542869

File tree

4 files changed

+21
-42
lines changed

4 files changed

+21
-42
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"docfx": {
6+
"version": "2.77.0",
7+
"commands": [
8+
"docfx"
9+
]
10+
}
11+
}
12+
}

gremlin-dotnet/src/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
/docfx
2-
docfx.zip
31
/_site

gremlin-dotnet/src/docfx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"src": [
55
{
6-
"files": [ "**/*.cs" ],
6+
"files": [ "**/*.csproj" ],
77
"exclude": [ "**/bin/**", "**/obj/**" ],
88
"src": "Gremlin.Net"
99
}

gremlin-dotnet/src/pom.xml

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ limitations under the License.
2727
<name>Apache TinkerPop :: Gremlin.Net - Source</name>
2828
<packaging>${packaging.type}</packaging>
2929
<properties>
30-
<nugetVersion>4.9.2</nugetVersion>
30+
<nugetVersion>6.11.1</nugetVersion>
3131
<nugetExe>nuget-${nugetVersion}.exe</nugetExe>
3232
</properties>
3333

@@ -155,44 +155,13 @@ limitations under the License.
155155
<configuration>
156156
<target>
157157
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
158-
<if>
159-
<!-- docfx sadly requires mono and nuget at this time:
160-
1. https://github.com/dotnet/docfx/issues/3389 (nuget required for a dll not in mono
161-
2. https://github.com/dotnet/docfx/issues/718#issuecomment-256700598 (mono workaround) -->
162-
<and>
163-
<available file="mono" filepath="${env.PATH}"/>
164-
<available file="${nugetExe}"/>
165-
</and>
166-
<then>
167-
<if>
168-
<available file="docfx/docfx.exe"/>
169-
<then>
170-
<echo>docfx already downloaded.</echo>
171-
</then>
172-
173-
<else>
174-
<exec executable="wget" failonerror="true">
175-
<arg line="https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip"/>
176-
</exec>
177-
<mkdir dir="docfx"/>
178-
<exec executable="unzip" failonerror="true">
179-
<arg line="docfx.zip -d docfx"/>
180-
</exec>
181-
<delete file="docfx.zip"/>
182-
<exec executable="mono" failonerror="true">
183-
<arg line="${nugetExe} install -OutputDirectory docfx SQLitePCLRaw.core -ExcludeVersion"/>
184-
</exec>
185-
</else>
186-
</if>
187-
<exec executable="mono" failonerror="true">
188-
<arg line="docfx/docfx.exe"/>
189-
</exec>
190-
</then>
191-
<else>
192-
<echo>Skipping docfx generation as mono and nuget are required.</echo>
193-
<echo>nuget must be installed as it would if doing a .NET deployment - see the glv-dotnet-deploy Maven profile for more information.</echo>
194-
</else>
195-
</if>
158+
<!-- update docfx if necessary -->
159+
<exec executable="dotnet" failonerror="true">
160+
<arg line="dotnet tool restore"/>
161+
</exec>
162+
<exec executable="dotnet" failonerror="true">
163+
<arg line="docfx docfx.json"/>
164+
</exec>
196165
</target>
197166
</configuration>
198167
</execution>

0 commit comments

Comments
 (0)