diff --git a/README.md b/README.md index 12ea1a6..e1cb003 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,17 @@ MicaSetup is a universal advanced installation package generation tool project t 🚧Under construction🚧 +### Usage of `fetchver` + +```bash +@echo off +for /f "tokens=* delims=" %%i in ('fetchver.exe /v3 "fetchver.exe"') do set fetchver=%%i +@echo The result is: %fetchver% +@pause +``` + +Support options: v1, v2, v3, v4 + ## 🎃Developer ### ⚙️Debug Codes diff --git a/build/MicaSetup.Tools/FetchVer/CommandLine.cs b/build/MicaSetup.Tools/FetchVer/CommandLine.cs index 0140471..d1ceeb7 100644 --- a/build/MicaSetup.Tools/FetchVer/CommandLine.cs +++ b/build/MicaSetup.Tools/FetchVer/CommandLine.cs @@ -135,6 +135,7 @@ public static (string, string?, string?) GetPaths(string[] args) fieldCount = args.Any(arg => arg.Equals("/v1")) ? 1 : fieldCount; fieldCount = args.Any(arg => arg.Equals("/v2")) ? 2 : fieldCount; fieldCount = args.Any(arg => arg.Equals("/v3")) ? 3 : fieldCount; + fieldCount = args.Any(arg => arg.Equals("/v4")) ? null : fieldCount; return fieldCount; } }