Skip to content
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

Closed
Tracked by #1617
jthomasmock opened this issue Sep 22, 2023 · 5 comments
Closed
Tracked by #1617

positron CLI returns VS Code version #1373

jthomasmock opened this issue Sep 22, 2023 · 5 comments
Assignees
Labels
area: workbench Issues related to Workbench category.

Comments

@jthomasmock
Copy link
Contributor

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:

  1. call positron --version
  2. get back 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?

@MariaSemple
Copy link

Workbench will need to be able to call this so that we can support changes to positron over time.

@jmcphers jmcphers added this to the Internal Preview milestone Sep 26, 2023
@MariaSemple
Copy link

@jmcphers
Copy link
Collaborator

Also reported by @blairj09: https://positpbc.slack.com/archives/C05M2EZCPGR/p1708372707054269.

Added to the Posit Workbench epic: #1617

@wesm wesm added the area: workbench Issues related to Workbench category. label Feb 29, 2024
sharon-wang added a commit that referenced this issue Oct 23, 2024
…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>
```
@sharon-wang
Copy link
Member

QA Notes

@testlabauto
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2024.11.0-103
OS Version          : ubuntu

Test scenario(s)

positron --version
works now on ubuntu

Link(s) to TestRail test cases run or created:

sharon-wang added a commit that referenced this issue Oct 25, 2024
### 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>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: workbench Issues related to Workbench category.
Projects
None yet
Development

No branches or pull requests

7 participants