Skip to content

Commit 06d48dc

Browse files
authored
Merge pull request #13211 from github/mbg/identify-environment-stubs
Shared: Add stubs for `identify-environment` scripts
2 parents 6483080 + 5d89b07 commit 06d48dc

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

go/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CODEQL_PLATFORM = osx64
1414
endif
1515
endif
1616

17-
CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh pre-finalize.cmd pre-finalize.sh index.cmd index.sh tracing-config.lua)
17+
CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh pre-finalize.cmd pre-finalize.sh index.cmd index.sh identify-environment.cmd identify-environment.sh tracing-config.lua)
1818

1919
EXTRACTOR_PACK_OUT = build/codeql-extractor-go
2020

go/extractor/cli/go-autobuilder/go-autobuilder.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Build behavior:
4444
to 'false' disables the GOPATH set-up, CODEQL_EXTRACTOR_GO_BUILD_COMMAND (or alternatively
4545
LGTM_INDEX_BUILD_COMMAND), can be set to a newline-separated list of commands to run in order to
4646
install dependencies, and LGTM_INDEX_IMPORT_PATH can be used to override the package import path,
47-
which is otherwise inferred from the SEMMLE_REPO_URL or GITHUB_REPOSITORY environment variables.
47+
which is otherwise inferred from the SEMMLE_REPO_URL or GITHUB_REPOSITORY environment variables.
4848
4949
In resource-constrained environments, the environment variable CODEQL_EXTRACTOR_GO_MAX_GOROUTINES
5050
(or its legacy alias SEMMLE_MAX_GOROUTINES) can be used to limit the number of parallel goroutines
@@ -931,9 +931,9 @@ func getVersionToInstall(v versionInfo) (msg, version string) {
931931
func outputEnvironmentJson(version string) {
932932
var content string
933933
if version == "" {
934-
content = `{ "include": [] }`
934+
content = `{ "go": {} }`
935935
} else {
936-
content = `{ "include": [ { "go": { "version": "` + version + `" } } ] }`
936+
content = `{ "go": { "version": "` + version + `" } }`
937937
}
938938
_, err := fmt.Fprint(os.Stdout, content)
939939

swift/tools/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ sh_binary(
1111
srcs = ["autobuild.sh"],
1212
)
1313

14+
sh_binary(
15+
name = "identify-environment",
16+
srcs = ["identify-environment.sh"],
17+
)
18+
1419
pkg_files(
1520
name = "scripts",
1621
srcs = [
22+
":identify-environment",
1723
":autobuild",
1824
":qltest",
1925
],

swift/tools/identify-environment.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
set -eu
4+
5+
echo '{ "swift": { "os": { "name": "macOS" } } }'

0 commit comments

Comments
 (0)