-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…raCore version. Merge pull request #2490 from dilijev:version-r14 Partially addresses #109 and #2472. This is intended as a first pass at the issue to provide some information at this point. Later, we plan to add more information such as whether a binary was produced as a developer build or an official build, what specific commit the binary was built from, which branch, which machine, etc. The specific set of information that we plan to provide is still being discussed in #109. ``` ch /v ch /version ch -v ch --v ch -version ch --version ``` (Supporting `-` and `--` prefixes for short and long flag names is consistent with how we process all behaviors. The logic I used here is a replica of that in `CmdLineArgsParser::Parse`.) The above all display the version information for `ch` and `ChakraCore` as `<major>.<minor>.<patch>.<QFE>` (note: by convention, ChakraCore's `QFE` is always `0`). For example on Windows for ChakraCore 1.4.1 with `ch.exe` and `ChakraCore.dll` from the same build: ``` $ ch -v ch.exe version 1.4.1.0 chakracore.dll version 1.4.1.0 ``` If with the same `ch.exe`, if `ChakraCore.dll` was from, e.g., a 2.0.0 build: ``` $ ch -v ch.exe version 1.4.1.0 chakracore.dll version 2.0.0.0 ``` On Linux: ``` ~/dev/ChakraCore$ ./BuildLinux/Release/ch -v ch version 1.4.1.0 ``` This flag is available in all flavors (including Release). --- Updating the help message. Also enable `-h` and `-help` as per request in #2472. Enables `-h` and `-help` for non-release builds, and `-?`, `-h`, and `-help` for release builds. Messages will look as follows. debug/test builds: ``` Usage: ch.exe [-v|-version] [-h|-help] [-?] [flaglist] <source file> -v|-version Displays version info -h|-help Displays this help message -? Displays this help message with complete [flaglist] info ``` release builds: ``` Usage: ch.exe [-v|-version] [-h|-help|-?] <source file> Note: [flaglist] is not supported in Release builds; try a Debug or Test build to enable these flags. -v|-version Displays version info -h|-help|-? Displays this help message ``` The distinction is that `-?` is already implemented in debug/test builds to display full information about the `[flaglist]` options. This is a minimal change here that will result in guiding the user more accurately in all build flavors, the effect of which is that `-?` in debug/test builds is still the only way to get information about the `[flaglist]` options.
- Loading branch information
Showing
5 changed files
with
129 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters