Skip to content

Commit e48fc66

Browse files
committed
Swift: Add identify-environment script
1 parent 081c069 commit e48fc66

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

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.cmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@echo off
2+
SETLOCAL EnableDelayedExpansion
3+
4+
echo { "swift": { "os": { "name": "macOS" } } }
5+
6+
ENDLOCAL

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)