File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- This feature currently only supports installing the latest published version
2- of DocFX. If support for older versions are required please file an Issue or
3- send a pull request .
1+ This feature installs the latest version compatible with Microsoft's internal documentation
2+ platform which is currently 2.67.5. You can install a different version or 'latest" by using
3+ the 'version' option .
44
55## OS Support
66
Original file line number Diff line number Diff line change 11{
22 "name" : " DocFX" ,
33 "id" : " docfx" ,
4- "version" : " 1 .0.2 " ,
4+ "version" : " 2 .0.0 " ,
55 "description" : " Installs docfx tools" ,
6+ "options" : {
7+ "version" : {
8+ "type" : " string" ,
9+ "proposals" : [
10+ " latest" ,
11+ " 2.67.5"
12+ ],
13+ "default" : " 2.67.5" ,
14+ "description" : " Select version of DocFX"
15+ }
16+ },
617 "customizations" : {
718 "vscode" : {
819 "extensions" : [
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ DOCFX_VERSION=${VERSION:- " 2.67.5" }
4+
35if command -v tdnf > /dev/null 2>&1 ; then
46 tdnf update
57 tdnf install -y dotnet-sdk-6.0 sudo awk ca-certificates
2224
2325if command -v sudo > /dev/null 2>&1 ; then
2426 if [ " root" != " $_REMOTE_USER " ]; then
25- sudo -u ${_REMOTE_USER} bash -c " cd ~ && dotnet tool install --global docfx"
26- exit 0
27+ if [ " latest" == " ${DOCFX_VERSION} " ]; then
28+ sudo -u ${_REMOTE_USER} bash -c " cd ~ && dotnet tool install --global docfx"
29+ exit 0
30+ else
31+ sudo -u ${_REMOTE_USER} bash -c " cd ~ && dotnet tool install --global docfx --version ${DOCFX_VERSION} "
32+ exit 0
33+ fi
2734 fi
2835fi
2936
30- dotnet tool install --global docfx
37+ if [ " latest" == " ${DOCFX_VERSION} " ]; then
38+ dotnet tool install --global docfx
39+ else
40+ dotnet tool install --global docfx --version ${DOCFX_VERSION}
41+ fi
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ check "no-dirs" grep -v "drwxr" <(ls -l /tmp/mariner_tests)
1111check " git-config" grep " ado-auth-helper" <( cat /tmp/mariner_tests/.git/config)
1212check " dotnet" grep " pkgs.dev.azure.com" <( cat /usr/local/bin/run-dotnet.sh)
1313check " nuget" grep " pkgs.dev.azure.com" <( cat /usr/local/bin/run-nuget.sh)
14+ check " docfx-version" bash -c " docfx --version"
1415
1516# Report result
1617# If any of the checks above exited with a non-zero exit code, the test will fail.
Original file line number Diff line number Diff line change 5454 "options" : " --single-branch --no-src" ,
5555 "scalar" : " true"
5656 },
57- "artifacts-helper" : {}
57+ "artifacts-helper" : {},
58+ "docfx" : {"version" : " latest" }
5859 },
5960 "remoteEnv" : {
6061 "EXT_GIT_PAT" : " dummypat"
Original file line number Diff line number Diff line change 66source dev-container-features-test-lib
77
88# Feature-specific tests
9- check " version" docfx --version
9+ check " version" bash -c " docfx --version | grep '2.67.5' "
1010
1111# Report results
1212# If any of the checks above exited with a non-zero exit code, the test will fail.
You can’t perform that action at this time.
0 commit comments