Skip to content

Add -version to CLI #834

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

Conversation

maschwenk
Copy link
Contributor

@maschwenk maschwenk commented Apr 28, 2025

This is helpful for us who are testing nightlies to be able to work backwards to figure out where regressions happened

built/local/tsgo -version
yields
Version 7.0.0-dev-59d25dc322652bb501bf0551ff86529262fee71a

@Copilot Copilot AI review requested due to automatic review settings April 28, 2025 18:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new CLI flag --version that prints the current version or commit SHA for development builds.

  • Adds a new boolean field to cliOptions and registers the --version flag.
  • Implements a code path in runMain() to read build info and print the commit SHA or "version unknown".

Co-authored-by: Jake Bailey <[email protected]>
@maschwenk maschwenk force-pushed the mfs-add-support-for-displaying-ts-go-version branch from b0801c7 to a82e4ec Compare April 28, 2025 19:17
@jakebailey jakebailey enabled auto-merge April 28, 2025 19:21
@maschwenk maschwenk changed the title Add --version to CLI Add -version to CLI Apr 28, 2025
@jakebailey jakebailey added this pull request to the merge queue Apr 28, 2025
Merged via the queue into microsoft:main with commit 38d5634 Apr 28, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants