batches: bump src-cli constant for 4.5 release (#47670)

This commit is contained in:
Bolaji Olajide 2023-02-15 19:02:29 +01:00 committed by GitHub
parent f489bccd77
commit 712db97b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 429 additions and 77 deletions

View File

@ -7,7 +7,7 @@
|------|-------------|---------------|
| `-associated-index-id` | ID of the associated index record for this upload. For internal use only. | `-1` |
| `-commit` | The 40-character hash of the commit. Defaults to the currently checked-out commit. | |
| `-file` | The path to the LSIF dump file. | `./dump.lsif` |
| `-file` | The path to the LSIF dump file. | |
| `-github-token` | A GitHub access token with 'public_repo' scope that Sourcegraph uses to verify you have access to the repository. | |
| `-gitlab-token` | A GitLab access token with 'read_api' scope that Sourcegraph uses to verify you have access to the repository. | |
| `-ignore-upload-failure` | Exit with status code zero on upload failure. | `false` |
@ -20,6 +20,7 @@
| `-open` | Open the LSIF upload page in your browser. | `false` |
| `-repo` | The name of the repository (e.g. github.com/gorilla/mux). By default, derived from the origin remote. | |
| `-root` | The path in the repository that matches the LSIF projectRoot (e.g. cmd/project1). Defaults to the directory where the dump file is located. | |
| `-skip-scip` | Skip converting LSIF index to SCIP if the instance supports it; this option should only used for debugging | `false` |
| `-trace` | -trace=0 shows no logs; -trace=1 shows requests and response metadata; -trace=2 shows headers, -trace=3 shows response body | `0` |
| `-upload-route` | The path of the upload route. For internal use only. | `/.api/lsif/upload` |
@ -33,7 +34,7 @@ Usage of 'src code-intel upload':
-commit string
The 40-character hash of the commit. Defaults to the currently checked-out commit.
-file string
The path to the LSIF dump file. (default "./dump.lsif")
The path to the LSIF dump file.
-github-token string
A GitHub access token with 'public_repo' scope that Sourcegraph uses to verify you have access to the repository.
-gitlab-token string
@ -58,6 +59,8 @@ Usage of 'src code-intel upload':
The name of the repository (e.g. github.com/gorilla/mux). By default, derived from the origin remote.
-root string
The path in the repository that matches the LSIF projectRoot (e.g. cmd/project1). Defaults to the directory where the dump file is located.
-skip-scip
Skip converting LSIF index to SCIP if the instance supports it; this option should only used for debugging
-trace int
-trace=0 shows no logs; -trace=1 shows requests and response metadata; -trace=2 shows headers, -trace=3 shows response body
-upload-route string

View File

@ -1,22 +1,29 @@
# `src validate install`
# `src extensions copy`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-current-user` | The current user | |
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-extension-id` | The <extID> in https://sourcegraph.com/extensions/<extID> (e.g. sourcegraph/java) | |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
## Usage
```
Usage of 'src validate install':
Usage of 'src extensions copy':
-current-user string
The current user
-dump-requests
Log GraphQL requests and responses to stdout
-extension-id string
The <extID> in https://sourcegraph.com/extensions/<extID> (e.g. sourcegraph/java)
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-insecure-skip-verify
@ -25,23 +32,9 @@ Usage of 'src validate install':
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
'src validate install' is a tool that validates a Sourcegraph installation.
Examples:
Copy an extension from Sourcegraph.com to your private registry.
Run default checks:
$ src validate install
Provide a YAML configuration file:
$ src validate install config.yml
Provide a JSON configuration file:
$ src validate install config.json
Environmental variables
SRC_GITHUB_TOKEN GitHub access token for validation features
```
```

View File

@ -0,0 +1,46 @@
# `src extensions delete`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-id` | The ID (GraphQL API ID, not extension ID) of the extension to delete. | |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
## Usage
```
Usage of 'src extensions delete':
-dump-requests
Log GraphQL requests and responses to stdout
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-id string
The ID (GraphQL API ID, not extension ID) of the extension to delete.
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
Examples:
Delete the extension by ID (GraphQL API ID, not extension ID):
$ src extensions delete -id=UmVnaXN0cnlFeHRlbnNpb246...
Delete the extension with extension ID "alice/myextension":
$ src extensions delete -id=$(src extensions get -f '{{.ID}}' -extension-id=alice/myextension)
```

View File

@ -0,0 +1,46 @@
# `src extensions get`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-extension-id` | Look up extension by extension ID. (e.g. "alice/myextension") | |
| `-f` | Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Title}} ({{.RemoteURL}})" or "{{.|json}}") | `{{.|json}}` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
## Usage
```
Usage of 'src extensions get':
-dump-requests
Log GraphQL requests and responses to stdout
-extension-id string
Look up extension by extension ID. (e.g. "alice/myextension")
-f string
Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Title}} ({{.RemoteURL}})" or "{{.|json}}") (default "{{.|json}}")
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
Examples:
Get extension with extension ID "alice/myextension":
$ src extensions get alice/myextension
$ src extensions get -extension-id=alice/myextension
```

View File

@ -0,0 +1,11 @@
# `src extensions`
## Subcommands
* [`copy`](copy.md)
* [`delete`](delete.md)
* [`get`](get.md)
* [`list`](list.md)
* [`publish`](publish.md)

View File

@ -0,0 +1,56 @@
# `src extensions list`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-f` | Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Description}} ({{.RemoteURL}})" or "{{.|json}}") | `{{.ExtensionID}}` |
| `-first` | Returns the first n extensions from the list. (use -1 for unlimited) | `1000` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-query` | Returns extensions whose extension IDs match the query. (e.g. "myextension") | |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
## Usage
```
Usage of 'src extensions list':
-dump-requests
Log GraphQL requests and responses to stdout
-f string
Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Description}} ({{.RemoteURL}})" or "{{.|json}}") (default "{{.ExtensionID}}")
-first int
Returns the first n extensions from the list. (use -1 for unlimited) (default 1000)
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-query string
Returns extensions whose extension IDs match the query. (e.g. "myextension")
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
Examples:
List extensions:
$ src extensions list
List extensions whose names match the query:
$ src extensions list -query='myquery'
List *all* extensions (may be slow!):
$ src extensions list -first='-1'
```

View File

@ -0,0 +1,69 @@
# `src extensions publish`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-extension-id` | Override the extension ID in the manifest. (default: read from -manifest file) | |
| `-force` | Force publish the extension, even if there are validation problems or other warnings. | `false` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-git-head` | Override the current git commit for the bundle. (default: uses `git rev-parse head`) | |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-manifest` | The extension manifest file. | `package.json` |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-url` | Override the URL for the bundle. (example: set to http://localhost:1234/myext.js for local dev with parcel) | |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
## Usage
```
Usage of 'src extensions publish':
-dump-requests
Log GraphQL requests and responses to stdout
-extension-id string
Override the extension ID in the manifest. (default: read from -manifest file)
-force
Force publish the extension, even if there are validation problems or other warnings.
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-git-head git rev-parse head
Override the current git commit for the bundle. (default: uses git rev-parse head)
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-manifest string
The extension manifest file. (default "package.json")
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-url string
Override the URL for the bundle. (example: set to http://localhost:1234/myext.js for local dev with parcel)
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
Publish an extension to Sourcegraph, creating it (if necessary).
Examples:
Publish the "alice/myextension" extension described by package.json in the current directory:
$ cat package.json
{
"name": "myextension",
"publisher": "alice",
"title": "My Extension",
"main": "dist/myext.js",
"scripts": {"sourcegraph:prepublish": "parcel build --out-file dist/myext.js src/myext.ts"}
}
$ src extensions publish
Notes:
Source maps are supported (for easier debugging of extensions). If the main JavaScript bundle is "dist/myext.js",
it looks for a source map in "dist/myext.map".
```

View File

@ -18,6 +18,6 @@
* [`serve-git`](serve-git.md)
* [`snapshot`](snapshot.md)
* [`users`](users/index.md)
* [`validate`](validate/index.md)
* [`validate`](validate.md)
* [`version`](version.md)

View File

@ -0,0 +1,49 @@
# `src repos add-kvp`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-key` | The name of the key to add (required) | |
| `-repo` | The ID of the repo to add the key-value pair to (required) | |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
| `-value` | The value associated with the key. Defaults to null. | |
## Usage
```
Usage of 'src repos add-kvp':
-dump-requests
Log GraphQL requests and responses to stdout
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-key string
The name of the key to add (required)
-repo string
The ID of the repo to add the key-value pair to (required)
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
-value string
The value associated with the key. Defaults to null.
Examples:
Add a key-value pair to a repository:
$ src repos add-kvp -repo=repoID -key=mykey -value=myvalue
Omitting -value will create a tag (a key with a null value).
```

View File

@ -0,0 +1,45 @@
# `src repos delete-kvp`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-key` | The name of the key to be deleted (required) | |
| `-repo` | The ID of the repo with the key-value pair to be deleted (required) | |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
## Usage
```
Usage of 'src repos delete-kvp':
-dump-requests
Log GraphQL requests and responses to stdout
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-key string
The name of the key to be deleted (required)
-repo string
The ID of the repo with the key-value pair to be deleted (required)
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
Examples:
Delete a key-value pair from a repository:
$ src repos delete-kvp -repo=repoID -key=mykey
```

View File

@ -0,0 +1,49 @@
# `src repos update-kvp`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-key` | The name of the key to be updated (required) | |
| `-repo` | The ID of the repo with the key to be updated (required) | |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
| `-value` | The new value of the key to be set. Defaults to null. | |
## Usage
```
Usage of 'src repos update-kvp':
-dump-requests
Log GraphQL requests and responses to stdout
-get-curl
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-key string
The name of the key to be updated (required)
-repo string
The ID of the repo with the key to be updated (required)
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
-value string
The new value of the key to be set. Defaults to null.
Examples:
Update the value for a key on a repository:
$ src repos update-kvp -repo=repoID -key=my-key -value=new-value
Omitting -value will set the value of the key to null.
```

View File

@ -1,4 +1,4 @@
# `src users clean`
# `src users prune`
## Flags
@ -6,12 +6,13 @@
| Name | Description | Default Value |
|------|-------------|---------------|
| `-days` | Days threshold on which to remove users, must be 60 days or greater and defaults to this value | `60` |
| `-display-users` | display table of users to be deleted by prune | `false` |
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
| `-force` | skips user confirmation step allowing programmatic use | `false` |
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
| `-remove-admin` | clean admin accounts | `false` |
| `-remove-never-active` | removes users with null lastActive value | `false` |
| `-remove-admin` | prune admin accounts | `false` |
| `-remove-null-users` | removes users with no last active value | `false` |
| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
@ -19,9 +20,11 @@
## Usage
```
Usage of 'src users clean':
Usage of 'src users prune':
-days int
Days threshold on which to remove users, must be 60 days or greater and defaults to this value (default 60)
-display-users
display table of users to be deleted by prune
-dump-requests
Log GraphQL requests and responses to stdout
-force
@ -31,9 +34,9 @@ Usage of 'src users clean':
-insecure-skip-verify
Skip validation of TLS certificates against trusted chains
-remove-admin
clean admin accounts
-remove-never-active
removes users with null lastActive value
prune admin accounts
-remove-null-users
removes users with no last active value
-trace
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
-user-agent-telemetry
@ -43,9 +46,9 @@ This command removes users from a Sourcegraph instance who have been inactive fo
Examples:
$ src users clean -days 182
$ src users prune -days 182
$ src users clean -remove-admin -remove-never-active
$ src users prune -remove-admin -remove-null-users
```

View File

@ -0,0 +1,27 @@
# `src validate`
## Usage
```
'src validate' is a tool that validates a Sourcegraph instance.
EXPERIMENTAL: 'validate' is an experimental command in the 'src' tool.
Please visit https://docs.sourcegraph.com/admin/validation for documentation of the validate command.
Usage:
src validate command [command options]
The commands are:
install validates a Sourcegraph installation
kube validates a Sourcegraph deployment on a Kubernetes cluster
Use "src validate [command] -h" for more information about a command.
```

View File

@ -1,7 +0,0 @@
# `src validate`
## Subcommands
* [`install`](install.md)
* [`kube`](kube.md)

View File

@ -1,38 +0,0 @@
# `src validate kube`
## Flags
| Name | Description | Default Value |
|------|-------------|---------------|
| `-kubeconfig` | Absolute path to the kubeconfig file | `~/.kube/config` |
| `-namespace` | Specify the Kubernetes namespace to use | `default` |
| `-quiet` | Suppress output and return exit status only | `false` |
## Usage
```
Usage of 'src validate kube':
-kubeconfig string
(optional) absolute path to the kubeconfig file (default "~/.kube/config")
-namespace string
(optional) specify the kubernetes namespace to use
-quiet
(optional) suppress output and return exit status only
'src validate kube' is a tool that validates a Kubernetes based Sourcegraph deployment
Examples:
Run default deployment validation:
$ src validate kube
Specify Kubernetes namespace:
$ src validate kube --namespace sourcegraph
Specify the kubeconfig file location:
$ src validate kube --kubeconfig ~/.kube/config
Suppress output (useful for CI/CD pipelines)
$ src validate kube --quiet
```

View File

@ -6,4 +6,4 @@ package srccli
// as the suggested download with this instance.
//
// At the time of a Sourcegraph release, this is always the latest src-cli version.
const MinimumVersion = "4.4.0"
const MinimumVersion = "4.5.0"