All notable changes to src-cli are documented in this file.
- Removed
src sbomandsrc signaturecommands. SBOMs and container signatures are no longer published as of Sourcegraph 7.1.0.
- Updated Docker base image to alpine:3.22
- SBOM support: Added
--imageand--exclude-imageflags tosrc sbom fetchfor filtering which docker images SBOMs are fetched for. Both flags support glob patterns (e.g.,frontend,*api*) and comma-separated lists. Thesourcegraph/image name prefix is optional.
- The deprecated
src extensionscommands have been removed.
- Batch Changes: Added
-fail-fastflag tosrc batch previewandsrc batch applythat causes execution to immediately halt on the first error instead of continuing with other repositories. This enables faster iteration on batch specs. #1154
- Updated Go to 1.24.1
- Support uploading GZIP compressed SCIP indexes 1146
- Remove deprecated
lsifsubcommand, and remove LSIF->SCIP conversion support 1147
- Container signature verification support: Container signatures can now be verified for Sourcegraph releases after 5.11.4013 using
src signature verify -v <release>#1143
- Update x/net to fix CVE-2024-45338
- Update x/crypto to fix reported CVE-2024-45337
- cody gateway benchmark changes
- fix local builds for non sourcegraph team 1121
- Update SBOM output file extension from
.jsonto.cdx.json#1123 - Improve SBOM compatibility with scanning tools #1123
- Support HTTP(S), SOCKS5, and UNIX Domain Socket proxies via SRC_PROXY environment variable. #1120
- Fixed a compatibility issue that prevented
src sbom fetchfrom fetching some SBOMs #1119
- Fixed an issue preventing some commands from executing correctly when no arguments are passed #1117
- SBOM support: Software Bill of Materials (SBOMs) can now be fetched for Sourcegraph releases after 5.8.0 using
src sbom fetch -v <release>. #1115
- Update Go to 1.22.8
- Batch Changes: Added support for batch spec versions. Batch specs with
version: 2will default to keyword search to resolve workspaces if the pattern type is not specified explicitly. (https://github.com/sourcegraph/sourcegraph/pull/63613)
- validate kube: connections check removed.
- validate kube: exits non-zero when there are no pods or services in the target namespace.
- Improved error message when
src code-intel uploadruns into an authorization error. Sourcegraph versions after 5.4.0 require an access token to be passed via theSRC_ACCESS_TOKENenvironment variable for SCIP uploads. #1079 - Improved error message when
src validateruns into a connection error. #1081
- Updated dependencies to address CVE-2023-39325 and GHSA-m425-mq94-257g
- The fork attribute in changesetTemplate is now acknowleged when creating a batch change via
src-cli. #58156
- Added flag to configure the concurrency of uploading multipart code-intel indexes, for when limited upload bandwidth causes individual parts to timeout. #1023
- Replace
x11clipboard library withattoto/clipboardto support more platforms. #1022
- The temporary docker volume created during workspace preparation is now cleaned up when failure occurs. #1021.
- Fixed
src snapshot validate. #1010 - Fixed
src code-intel uploadnot respecting-insecure-skip-verify. #1012
src validate installcan check executor connections #974src validate installcan send test SMTP message #973src repos {add|update|delete}-metadata -repo-nameflag support #977
- Renamed
src repo {add|update|delete}-kvptorepo {add|update|delete}-metadata#972
- Fixed
src admin createreturning token to stderr instead of stdout. 963 - Fixed
src validate installfailure with Sourcegraph v5.0.0. 964
src admin createhas been added to setup initial admin accounts on new Sourcegraph deployments. 957
- Fixed
src validate installrequiringSRC_GITHUB_TOKENin all cases. 958
- Fixed
failed to check version returned by Sourcegraph: Invalid Semantic Versionerror in Batch Changes when running against an insiders version of Sourcegraph.
src team(experimental) has been added to manage teams. #922src codeowners(experimental) has been added to manage manually ingestedCODEOWNERS. #943
No noteworthy changes, mechanical release to match Sourcegraph release.
src codeintel uploadwill no longer overwrite the entire route supplied via-upload-routeif SCIP data is detected. #934
-
src codeintel uploadwill now upload SCIP indexes (over LSIF indexes) when the target instance supports it. #897 -
src validate kubeadds support for validating Sourcegraph deployments on Kubernetes. Validations include Pods, Services, PVCs, and network connectivity. #926
src validatehas an added check to determine if an instance is able to create a basic code insight. #912- Add visual feedback to
src validate installCLI #921 - Add insight cleanup as per #912
- Renamed
src users cleancommand tosrc users prune#901 - Failed code-intel uploads now print every error encountered while retrying instead of only the error encountered in the final retry attempt. #46281
src validatehas been changed tosrv validate installsubcommand #921- Move GitHub token for
srv validateto ENV var #921
- Fix network timeout in
src users cleanoccuring in instances with many users #901 - Aligned parsing of spec file parameter of
src batch reposwith other commands. #919 - Remove empty log outputs during batch spec execution. #923
- Removed create first admin feature from
src validate#921
- Batch Changes: Watchdog that checks for docker responsiveness while running commands has been added. #898
- Batch specs being run locally with
src batch previeworsrc batch applycan now be run with the-run-as-rootflag, which will run all step containers as root instead of the default user for the image. This is off by default. #886 - An experimental set of
src snapshotcommands for generating and sharing snapshots of Sourcegraph instances, as well as testing Sourcegraph instances restored from snapshots. #888, #889, #890
- Batch specs being run from the server using this version of
src-clinow run all step containers as root, rather than as the default user for the image. #886
- Batch changes: Git patches are now binary encoded instead of UTF-8 over the wire, fixing support for non-UTF-8 files. #887
No noteworthy changes, mechanical release to match Sourcegraph release.
- Mounted files are now uploaded to the Sourcegraph instance when running
src batch previewandsrc batch apply. #861
- Improved output for failing docker pulls in batch change execution. #880
- All current and future versions of src-cli from version 3.43.2 and up will now be available for installation via Homebrew in addition to the latest version. A specific version can be installed with the command
brew install sourcegraph/src-cli/src-cli@X.Y.Z. #864
- Mounting files now works when running batch changes server side. #816
- Fixed a performance issue when serving git repos where it would take an exponentially large amount of time to list the repos. #810
- Fixed Bare git repo support when serving git repos. #810
- Removed git sub-repo support when serving git repos as it introduced a huge performance hit. #810
src users cleanuphas been added. #826
src extensionssubcommands are now deprecated, and will be removed in Sourcegraph 4.0.
src code-intel uploadnow includes an additional header for efficiently tracking the uncompressed size of uploads in the backend. #39690
- The default directory used to mount files into containers will be automatically changed to a temporary directory within
$HOMEif Docker Desktop for Linux is in use. #754 - src-cli no longer leaves corrupted repo archives behind when interrupted during batch spec execution. #817
- IMPORTANT: Searches using the command
src search -streamis updated to use a new and better search result schema, improving highlighting and accurate result counts for multiline matches. Please see the new JSON schema for results if you use thesrc search -stream -jsonoutput: #807
- INTERNAL ONLY: Fixed src batch exec not logging errors.
- Fixed an issue where execution would eventually fail with an error when there were unsupported or ignored workspaces found by server-side execution.
- Fixed an issue where no workspaces would be executed on after successful workspace resolution.
- Starting with Sourcegraph 3.42, src-cli will be resolving workspaces for Batch Changes server-side which is significantly faster and reduces network utilization.
- Batch specs that mount paths now cache results. sourcegraph/sourcegraph#37216
SRC_HEADERS="key:value\nkey2:value2"is now supported for passing multiple headers when authenticatingsrcwith custom auth proxies. See auth proxy configuration docs for more information. #796
- Some internal changes to
src batch execmode for server-side execution.
- Handle SIGINT interrupt when reading from Stdin. #794
- The default parallelism of
src batch previewandsrc batch applyare now based on the number of CPU cores available to Docker, rather than the host system runningsrc. This can be overridden with the-jflag. #786
- The preview link shown when running
src batch remoteto create a new batch change no longer 404s. sourcegraph/src-cli
- Adjusted internal mechanisms used in server-side execution. This has no user-facing impact.
- Batch Specs now support mounting a path from the local machine into a Docker container. sourcegraph/sourcegraph#31790
- When a step results in no change, it would fail with exit code 128 when used in caching. #778
- A bug where
previous_step.stdoutwould not be available for partially cached workspaces. #781
- A new templating variable,
batch_change_linkhas been added for more control over where the "Created by Sourcegraph batch change ..." message appears in the published changeset description. #491
- Global git email gets inserted as plain text when running
src batch new -f <file_name>and doesn't result in a schema validation failure. #773
- Output variables created from batch spec steps will no longer have an extra newline added if the output doesn't end with a newline. sourcegraph/sourcegraph#36562
- No substantive changes; these releases were related solely to improving our release machinery.
- It's now possible to install src-cli via
npm install -g @sourcegraph/src. #760
- No substantive changes; this release was related solely to improving our release machinery.
- Updated to the latest SCIP version, fixing a bug for scip-typescript uploads. sourcegraph/scip#30
src code-intelis a new alias forsrc lsif. #748
- Updated to the latest SCIP version, fixing a bug in the
src code-intel uploadconversion for "Find implementations". sourcegraph/scip#27
- New command
src debug. #731 src lsif uploadnow supports the-gitlab-tokenflag. #721- Batch Changes can be applied to Bitbucket Cloud when
srcis used with Sourcegraph 3.40 or later. #725 src lsif uploadaccepts indexes in the SCIP format. #742
- src CLI is now built using go 1.18.
- Added
logintext to command text menu and ordered alphabetically #713
src extensions copynow removes theurlproperty from extension manifests that points to the sourcegraph.com extension bundle, enabling use for air-gapped instances.
- Batch Changes: Step results are now also cached when the overall execution fails. #709
No noteworthy changes, mechanical release to match Sourcegraph release.
- A new
src batch remotecommand has been added to run a batch spec on a Sourcegraph instance that has Server Side Batch Changes enabled. #671
- Migrated to
grafana/regexpto match our usage in Sourcegraph proper. #694
- A bug in 3.36.3 caused
src batch applyto no longer accept a file provided with-f. This has been fixed. #695
src batchcommands no longer require-fto read from a file. Additionally, running asrc batchcommand that requires a batch spec file without a-foption from the terminal will now generate an error instead of waiting indefinitely for a batch spec on standard input; however, piping in a batch spec will still work as expected. #687- Pulling container images now occurs in parallel, with the number of concurrent downloads being controlled by the
-jflag. #17577
src batch [preview|apply]will now check that the target Sourcegraph instance supports batch changes before doing any other work and exit early in the case that it does not.
src validatecan now execute default validation checks (add external service, clone repo, search repo, search non-indexed branch of that repo, remove external service) for Sourcegraph instance when no validation file is specified as well as continue to support JSON and YAML file validation files.
src batch previewandsrc batch applycould erroneously return exit code 0 and no warning when the execution actually failed.
src execnow allows thefiles:property. (internal use only)
This version is the same as 3.35.3, just retagged for the upcoming 3.36.0 release of Sourcegraph.
- Certain Batch Changes features that previously would not work on prerelease versions of Sourcegraph will now work as expected again.
src batch validateandsrc batch reposnow accept-allow-unsupportedand-force-override-ignoreand don't fail on specs usingfilesanymore.
src validatehas been updated to work with Sourcegraph 3.35's changed CSRF behaviour. #673
- Individual batch changes can publish multiple changesets to the same repository by specifying multiple target branches using the
on.branchesattribute. #25228
src batch [preview|apply]will now use the faster volume workspace by default for macOS systems using arm64 processors (aka "Apple Silicon")
- Excess newlines in between outputs in logfiles written when
--keep-logsis used have been fixed. #665 srcwould sometimes panic when Ctrl-C was pressed while executing batch change steps due to a bug in the library used to render the execution progress bars. This has been fixed. 🤘 #666- In batch changes, when using
workspacessrc would incorrectly treatinnot being set as don't match anything. This is fixed and it matches everything like*. #664
- For internal use only: Allow exec mode to read step cache files from the current working directory.
- For internal use only: Fix an off-by-one error in the JSON log UI.
- Bare repositories can now be served with
src serve-git. Thanks to Andreas Rammhold for the contribution! #639
- For internal use only: Switch to single workspaces only in payload.
- A
-client-onlyflag has been added tosrc version. When set, only the local src-cli's version will be printed and no attempt is made to fetch the recommended version from the configured Sourcegraph server.
- Requests to Sourcegraph will now include the operating system and architecture
srcis running on by default. To disable this, set theSRC_DISABLE_USER_AGENT_TELEMETRYenvironment variable to any non-empty string, or provide the-user-agent-telemetry=falseflag on the command line. #15769
src searchwill not fail anymore on systems where the pagerlessis not installed. #644
- For internal use only: always log uploading changesets event.
- Removed debug output that could lead to glitches in the
src batch [preview|apply]TUI.
- For internal use only:
src batch execdoes not evaluateimportChangesetsin batch specs anymore, since that's already done server-side.
- Fixes a nil-panic that could be caused when
src batch [preview|apply]would encounter a repository that was currently being cloned or is empty.
- Importing changesets won't fail validation when uploading to Sourcegraph 3.33.
- Fixes an issue where src-cli would panic when importing existing changesets.
- For internal use only: the
src batch execcommand executes the provided batch spec in the given workspaces.
- For internal use only: when
src batch [preview|apply|exec]are executed in-text-onlymode, command output on stdout/stderr will be logged in the same message, with each line prefixed accordingly. #619
src batch reposfailed with a template error in src-cli 3.31.1 and 3.32.0. This has been fixed. #625- The
src campaignandsrc campaignscommands have been removed in favor ofsrc batch. #626
- For internal use only: JSON log UI has been extended.
src search -streamdisplayed the number of lines that contain matches instead of the number of matches.- For internal use only: the
EXECUTING_TASKSJSON log line now always contains an array oftasksinstead of possibly havingnullas thetasksvalue. - src-cli is now built using Go version 1.17.
src batch newnow omits the publish flag, if the Sourcegraph instance supports publish from GUI.
src batch validatenow accepts the standard flags used to control communication with Sourcegraph:-dump-requests,-get-curl,-insecure-skip-verify, and-trace. #577
src batch validatewould fail to validate batch specs that use features that depend on specific versions of Sourcegraph, such as workspaces. This has been fixed. #576
- Releases are now built for
arm64architectures too.
- For internal use only:
-text-onlysilently ignored an error when trying to print log messages and did not print aEXECUTING_TASKSmessage.
- For internal use only:
-text-onlynow contains detailed information about task execution. #571 - As part of the above: the TUI of
src batch [preview|apply]has been reworked and should now feel snappier.
- The per-step caching of batch spec execution results was broken when re-execution could use the cached results of a step and that step was the only one left to execute. That resulted in empty diffs being uploaded. This is now fixed. #567
Re-release of 3.29.3 for Sourcegraph 3.30.
count:allwas not supported in repository search queries for batch changes. This is now fixed. #566- For internal use only:
-text-onlyreceived a few tiny fixes for pluralisation and missing log messages. #565
- Starting with Sourcegraph 3.30.0, the
publishedfield is optional in batch specs. If omitted, the publication state will be controlled through the Batch Changes UI. #538 - For internal use only:
-text-onlyflag added tosrc batch [apply|preview]. #562
- LSIF uploads now respect the
-insecure-skip-verifyflag to insecurely (surprise!) skip TLS certificate validation when communicating with Sourcegraph. #559
- Various terminal handling fixes, especially for Batch Changes users with regards to resizing terminals and Windows support. #560
- The
src repos enable|disablecommands were removed as they are no longer supported.
- Cached step results produced by
src batch [apply|preview]are now properly cleared when using the-clear-cachecommand line flag.
- The step-wise caching for
src batch [apply|preview]introduced in 3.28.1 could break if a cached diff contained quoted. This fixes the application by disabling any unquoting/expansion. - A regression was introduced in 3.28.1 that broke the UI for
src batch [apply|preview]and lead to the execution of steps looking like it got stuck in the first repository.
src batch [apply|preview]now cache the results of each step when executing a batch spec. That can make re-execution a lot faster when only a subset of the steps has been changed. #540
src serve-gitcan now handle gzip-encoded requests. #547
- This release is identical to 3.27.1, and is simply a version number bump to correspond with the forthcoming release of Sourcegraph 3.28.
- Starting with Sourcegraph 3.28.0 batch spec
stepscan contain anif: <template string>attribute that determines whether the given step will be executed. #520
- When specifying
-skip-errors, the batch spec would always be empty. This ix fixed and the intended behavior has been restored. #539
- Extension publishing will now add a
gitHeadproperty to the extension's manifest. #500 src batch [apply|preview]now ignore repositories in which a.batchignorefile exists. The-force-override-ignoreflag can be used to turn that behaviour off. #509src searchnow supports streaming search. Ifsrc searchis called with the flag-stream,src-cliwill stream back search results as they are found. In conjunction with-streamyou can also specify-display <integer>to limit the number of results that will be displayed. For example, use-display 0if you are interested in the search statistics, such as number of results, but don't need to see the actual matches.
- Extension publishing will now add a
gitHeadproperty to the extension's manifest. #500 src batch [apply|preview]now ignore repositories in which a.batchignorefile exists. The-force-override-ignoreflag can be used to turn that behaviour off. #509
- Publishing of Docker images for
srcwas broken after release 3.24.3. This has been fixed, andsourcegraph/src-cliimages are available once again. #501
- Directly applying a batch change with
src batch applyagainst Sourcegraph 3.25 or older would fail in 3.26.0. This has been fixed. #495
- Two new templating variables have been added:
batch_change.nameandbatch_change.description. #491
- Campaigns are now known as Batch Changes! The
src campaignset of commands have been renamed tosrc batch; however,src campaignandsrc campaignswill be retained as aliases forsrc batchuntil the next major version of Sourcegraph. There should be no breaking changes as a result of this change. #489
- The src login command now also properly respects the
-insecure-skip-verifyflag.
- The volume workspace Docker image is now only pulled if the volume workspace mode is in use. #477
- Using volume workspace mode could result in Git errors when used with Docker containers that do not run as root. These have been fixed. #478
- Added a flag
-insecure-skip-verifyto disable TLS certificate validation.
- Deprecated cache file formats are not read by
src campaign [apply|preview]anymore.
src users deletenow asks for confirmation to delete all users when no user ID is provided. #470
- The homebrew recipe for
src-clicontained the wrong binary name.
- Workspaces could sometimes fail with docker bind mount errors, due to a race condition of multiple workspaces accessing the same auxilliary files. #468
- Importing changesets was broken in the previous release and caused a SIGSEGV error.
- Experimental (requires Sourcegraph 3.25 or later):
workspacesin campaign specs is now available to allow users to define multiple workspaces in a single repository. #442 and #462. - The
changesetTemplate.publishedfield can now also be used to address a specific changeset in a repository by adding@branch-of-changesetat the end of the pattern. See #461 for an example and details.
- When
dockerbecomes unresponsivesrc campaign [apply|preview]would get stuck and ignore Ctrl-C signals. That is now fixed. - The
steps.filesattributes in campaign specs have been broken since 3.23.2 and now work again.
- 3.24.2 disabled the faster volume workspace on macOS when one or more non-root Docker images was used by a campaign to work around the bug in issue #432. This functionality has now been restored. #434
- Executing campaigns on macOS 11 with Docker 3.1 could fail when using a volume workspace. This has been fixed. #436
- Internal changes to the
src lsif uploadcommand. #430
stepsin campaign specs can now haveoutputsthat support templating. #424changesetTemplatefields in campaign specs now also support templating. #424
- Add verbosity flag to
lsif uploadaction. Supply-trace=1,-trace=2, or-trace=3to the action to specify verbosity.
src campaign [apply|preview]can now make use of Docker volumes, rather than bind-mounting the host filesystem. This is now the default on Intel macOS so long as the Docker images used in the campaign steps run as the same user, as volume mounts have generally better performance there. The optional-workspaceflag can be used to override the default. #412
src loginnow defaults to validating againstSRC_ENDPOINTif configured.
src confignow works correctly when provided a subject.
- The src version command didn't send any authentication headers before, which could have failed for some instance configurations. The authentication header is now properly set for the request done in this command. #411
- Experimental:
transformChangesin campaign specs is now available as a feature preview to allow users to create multiple changesets in a single repository. #398
src campaign [apply|preview]now show the current execution progress in numbers next to the progress bar. #396
- Two race conditions in the terminal UI of
src campaign [apply|preview]have been fixed. #399 - A regression caused repositories on unsupported code host to not be skipped by
src campaign [apply|preview], regardless of whether-allow-unsupportedwas set or not. #403 - Previously
src campaign [apply|preview]would crash when executing a campaign spec that containedstepsbut nochangesetTemplate. #406 src extensions copywould copy an extension from the wrong Sourcegraph instance. #409
- Campaign steps may now include environment variables from outside of the campaign spec using array syntax. #392
- A new
-skip-errorsflag has been added tosrc campaign [apply|preview]to allow users to continue execution of and upload a campaign spec even if execution failed in some repositories. #395
- The evaluation of the
repository.branchattribute has been fixed to actually cause the correct version of the repository to be used. #393 - Normally, when one or more repositories in a campaign generate an empty diff, a changeset spec isn't created. From src-cli 3.21.9 to 3.22.3, inclusive, re-running a campaign would result in an empty changeset spec being created by mistake if the empty changeset spec was in the execution cache, which would result in errors on Sourcegraph when applying the campaign. This has been fixed, and empty changeset specs in the cache are now treated the same way as uncached changeset specs that are empty: they are skipped, and a message is displayed in
-vmode indicating the repo that was skipped. #397
src campaign [apply|preview]now prints more detailed information about the diffs produced in each repository when run in verbose mode with-v. #390- The dependency
go-diffhas been upgraded to 0.6.1 to include sourcegraph/go-diff#55.
- If
src campaign [validate|apply|preview]was aborted while it was downloading repository archives it could leave behind partial ZIP files that would produce an error on the next run. This is now fixed by deleting partial files on abort. #388 - A bug in
src campaign [apply|preview]that would cause status bars in the TUI to not update has been fixed. #389
src campaign [validate|apply|preview]now print an error and usage information if a user accidentally provides an additional argument. #384- Fix a regression that was introduced by #361 and caused the "Resolving repositories" step of
src campaign [apply|preview]to crash when the search query in the campaign spec yielded file matches and repository matches from the same repository.
- Fixed a bug that could cause
src campaign [apply|preview]to crash in rare circumstances when executing a campaign spec due to a bug in the logic for the progress bar. #378
- Commands for campaigns no longer require the
-namespaceparameter. If omitted, campaigns will use the currently authenticated user as the namespace. #372 src campaign [apply|preview]now caches the result of running steps in a repository even if they didn't produce changes.
src campaign [apply|preview]could fail to parse the produced diff in a repository whengitwas configured to use a customdiffprogram. The fix is to ignore any localgitconfiguration when runninggitcommands. #373
- Restored backward compatibility when creating campaigns against Sourcegraph 3.19, provided author details are not provided in the campaign spec. #370
- Campaign steps run in a container that does not run as root could fail on systems that do not map the running user ID to the container, most notably desktop Linux. This has been fixed: temporary files and workspaces mounted into the container now have sufficient permissions to allow the container user to execute the step. #366
- Executing campaigns on Windows would fail due to obscure
--cidfileerrors: namely, the temporary cidfile would not be removed beforedocker runwas invoked. This has been fixed. #368 - Unresponsive containers started by
src campaign [apply|preview]can now be killed by hitting Ctrl-C. Previously the signal wasn't properly forwarded to the process in the container. #369
- EXPERIMENTAL: Templated campaign specs and file mounting. The campaign specs evaluated by
src campaign [preview|apply]can now include template variables insteps.run,steps.env, and the newsteps.filesproperty, which allows users to create files inside the container in which the step is executed. The feature is marked as EXPERIMENTAL because it might change in the near future until we deem it non-experimental. See #361 for details.
- The
src lsif uploadcommand now respectsSRC_HEADER_environment variables for multipart uploads. These environment variables are described here. #360
- The progress bar in
src campaign [preview|apply]now shows when executing a step failed in a repository by styling the line red and displaying standard error output. #355 - The
src lsif uploadcommand will give more informative output when an unexpected payload (non-JSON or non-unmarshallable) is received from the target endpoint. #359
- The cache dir used by
src campaign [preview|apply]is now created before trying to create files in it, fixing a bug where the first run of the command could fail with a "file doesn't exist" error message. #352
- The
publishedflag in campaign specs may now be an array, which allows only specific changesets within a campaign to be published based on the repository name. #294 - A new
src campaign newcommand creates a campaign spec YAML file with common values prefilled to make it easier to create a new campaign. #339 - New experimental command
src validatevalidates a Sourcegraph installation. #200
- Error reporting by
src campaign [preview|apply]has been improved and now includes more information about which step failed in which repository. #325 - The default behaviour of
src campaigns [preview|apply]has been changed to retain downloaded archives of repositories for better performance across re-runs of the command. To use the old behaviour and delete the archives use the-clean-archivesflag. Repository archives are also not stored in the directory for temp data (see-tmpflag) anymore but in the cache directory, which can be configured with the-cacheflag. To manually delete archives between runs, delete the*.zipfiles in the-cachedirectory (seesrc campaigns -helpfor its default location). src campaign [preview|apply]now check whethergitanddockerare available before trying to execute a campaign spec's steps. #326- The progress bar displayed by
src campaign [preview|apply]has been extended by status bars that show which steps are currently being executed for each repository. #338 src campaign [preview|apply]now shows a warning when no changeset specs have been created.- Requests sent to Sourcegraph by the
src campaigncommands now use gzip compression for the body when talking to Sourcegraph 3.21.0 and later. #336 and #343
- Log files created by
src campaigns [preview|apply]are deleted again after successful execution. This was a regression and is not new behaviour. If steps failed to execute or the-keep-logsflag is set the log files are not cleaned up. src campaign [preview|apply]now correctly handle the interrupt signal (emitted in a terminal with Ctrl-C) and abort execution of campaign steps, cleaning up running Docker containers.
- The new
src loginsubcommand helps you authenticatesrcto access your Sourcegraph instance with your user credentials. #317
- Campaigns specs now include an optional
authorproperty. (If not included,src campaignsgenerates default values for author name and email.)src campaignsnow includes the name and email in all changeset specs that it generates. - The campaigns temp directory can now be overwritten by using the
-tmpflag withsrc campaigns [apply|preview]or by settingSRC_CAMPAIGNS_TMP_DIR. The directory is used to, for example, store log files and unzipped repository archives when executing campaign specs.
- Repositories without a default branch are skipped when applying/previewing a campaign spec. #312
- Log files produced when applying/previewing a campaign spec now have the
.logfile extension for easier opening. #315 - Campaign specs that apply to unsupported repositories will no longer generate an error. Instead, those repositories will be skipped by default and the campaign will be applied to the supported repositories only. #314
- Empty changeset specs without a diff are no longer uploaded as part of a campaign spec. #313
- The default branch for the
src-cliproject has been changed tomain. #262
src campaignsoutput has been improved in the Windows console. #274src campaignswill no longer generate warnings ifuser.nameoruser.emailhave not been set in the global Git configuration. #277
- Add
-dump-requestsas an option to all commands that interact with the Sourcegraph API. #266
- Reworked the
src campaignsfamily of commands to align with the new spec-based workflow. Most notably, campaigns are now created and applied using the newsrc campaigns applycommand, and use the new YAML spec format. #260
- Add -upload-route to the lsif upload command.
- New command
src serve-gitwhich can serve local repositories for Sourcegraph to clone. This was previously in a command calledsrc-expose. See serving local repositories in our documentation to find out more. #12363 - When used with Sourcegraph 3.18 or later, campaigns can now be created on GitLab. #231
- Fix inferred root for lsif upload command. #248
- Removed
clone-in-progressflag. #246
- Add
--no-progressflag to thelsif uploadcommand to disable verbose output in non-TTY environments. SRC_HEADER_AUTHORIZATION="Bearer $(...)"is now supported for authenticatingsrcwith custom auth proxies. See auth proxy configuration docs for more information. #239- Pull missing docker images automatically. #191
- Searches that result in errors will now display any alerts returned by Sourcegraph, including suggestions for how the search could be corrected. #221