diff options
Diffstat (limited to '')
| -rwxr-xr-x | ci/build-environment.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ci/build-environment.py b/ci/build-environment.py new file mode 100755 index 0000000..64a827a --- /dev/null +++ b/ci/build-environment.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 + +from shutil import which +import subprocess + + +def go_version(): + print("go information:") + + path = which("go") + print(f" path={path}") + + cmd = subprocess.run([path, "version"], capture_output=True, text=True) + # output is `go version go1.21.5 darwin/arm64`, we want the version and architecture + version = cmd.stdout.rstrip().split() + print(f" version={version[2]}") + print(f" architecture={version[3]}") + + +def main(): + go_version() + + +if __name__ == "__main__": + main() |
