-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
positron CLI returns VS Code version #1373
Comments
Workbench will need to be able to call this so that we can support changes to positron over time. |
Another place we check the version, but without invoking the CLI: https://github.com/rstudio/rstudio-pro/blob/main/src/cpp/server/extras/scripts/install-vs-code-ext.sh.in#L66-L70 |
Also reported by @blairj09: https://positpbc.slack.com/archives/C05M2EZCPGR/p1708372707054269. Added to the Posit Workbench epic: #1617 |
…ut (#5072) ## Description - addresses #1373 - updates `positron --version`, `positron --help`, `positron-server --version`, `positron-server --help` to output Positron version information - updates Linux package version info to use Positron version - I updated our snapcraft.yml, but we don't publish on Snap yet, so it's just a speculative change for now ## QA Notes Please test this functionality in each of our builds across all platforms! I've tested this with Desktop Mac and REH-Web on Ubuntu. Note that the Command Prompt command to install `positron` in PATH is not available on every operating system. On some platforms, it seems that `positron` is automatically installed in the PATH upon installation. ### Check `--version` Sample Output: ``` Positron: 2024.11.0 build 70 Positron SHA: 5182905 Code OSS: 1.93.0 Arch: arm64 ``` #### Desktop Build 1. Use the Command Prompt to `Shell Command: Install 'positron' command in PATH` (`workbench.action.installCommandLine`) 2. Run `positron --version` in a Terminal 3. Confirm the output contains the expected information and format #### REH or REH Web Build 1. Locate the `positron-server` executable, which will be in the `bin` directory of the REH or REH Web binary 2. Run `positron-server --version` in a Terminal 3. Confirm the output contains the expected information and format ### Check `--help` Sample Output: ``` Positron 2024.11.0 <REST_OF_HELP> ``` #### Desktop Build 1. Use the Command Prompt to `Shell Command: Install 'positron' command in PATH` (`workbench.action.installCommandLine`) 2. Run `positron --help` in a Terminal 3. The first line of output should show `Positron <POSITRON_VERSION>` #### REH or REH Web Build 1. Locate the `positron-server` executable, which will be in the `bin` directory of REH or REH Web binary 2. Run `positron-server --help` in a Terminal 3. The first line of output should show `Positron <POSITRON_VERSION>` ### Check package info #### DEB 1. Run `dpkg --info <POSITRON_BINARY>.deb` 2. Confirm the Version field in the output shows `<POSITRON_VERSION> build <BUILD_NUMBER>` Sample Output: ``` <SOME_INITIAL_INFO> Package: positron Version: 2024.11.0 build 16 <REST_OF_INFO> ``` #### RPM 1. Run `rpm -qi <POSITRON_BINARY>.rpm` 2. Confirm the Version field in the output shows `<POSITRON_VERSION> build <BUILD_NUMBER>` Sample Output: ``` Name : positron Version : 2024.11.0 build 16 <REST_OF_INFO> ```
QA Notes
|
Verified Fixed
Test scenario(s)positron --version Link(s) to TestRail test cases run or created: |
### Summary - addresses #5159 - related to #1373 - a follow-up to #5072 to fix up the DEB and RPM package info build number ### Changes - The `positronBuildNumber` from the package.json file will always be zero -- instead, we need to use the calculated build number from show-version.js when possible. - We are already using the calculated build number in a few places, but a few were missing, resulting in a build number of zero `0` in the DEB and RPM package info. - The `positronBuildVersion` variable is now in a separate util file, so the value can be used across the gulpfiles. ### QA Notes I've checked the version output of the DEB on Ubuntu 24 (x86_64) and the RPM on Fedora 40 (arm). #### DEB 1. Run `dpkg --info <POSITRON_BINARY>.deb` 2. Confirm the Version field in the output shows `<POSITRON_VERSION>+<BUILD_NUMBER>-<LINUX_REVISION>` Sample Output: ``` <SOME_INITIAL_INFO> Package: positron Version: 2024.11.0+999-1729709839 <REST_OF_INFO> ``` #### RPM 1. Run `rpm -qi <POSITRON_BINARY>.rpm` 2. Confirm the Version field in the output shows `<POSITRON_VERSION>+<BUILD_NUMBER>` Sample Output: ``` Name : positron Version : 2024.11.0+999 <REST_OF_INFO> ```
Positron Version: Positron Version: 2023.09.0 (Universal) build 203
Code - OSS Version: 1.79.0
Commit: 519fbc7
Date: 2023-09-22T02:37:21.484Z
Electron: 22.3.10
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.6.0
Steps to reproduce the issue:
positron --version
1.79.0
What did you expect to happen?
Get the Positron version rather than VS Code version:
IE: 2023.09.0 (Universal) build 203
I'd also prefer this over having to go to About and copying the Positron version manually
Were there any error messages in the output or Developer Tools console?
The text was updated successfully, but these errors were encountered: