src-cli icon indicating copy to clipboard operation
src-cli copied to clipboard

Add check to display outdated version warning

Open alicse3 opened this issue 6 months ago • 0 comments

Fixes #930

This change checks for outdated src-cli version and prints warning message for any command.

➜  src-cli git:(check-for-outdated-version) ✗ ./src
⚠️  You are using an outdated version 4.3.0. Please upgrade to 5.2.1 or later.
src is a tool that provides access to Sourcegraph instances.
For more information, see https://github.com/sourcegraph/src-cli

Usage:

	src [options] command [command options]

Examples: login Warning search Warning version Warning

Test plan

  • Pull this PR changes and run cli commands directly(go run ./cmd/src) or by building go build ./cmd/src && ./src.
  • To test different versions, change version.BuildTag value and re-run commands.

alicse3 avatar Feb 01 '24 10:02 alicse3