3
0
Fork 0
mirror of https://gitea.com/actions/setup-go.git synced 2024-11-25 02:59:31 +01:00
setup-go/__tests__/verify-go.sh
2020-06-29 11:41:13 -04:00

14 lines
No EOL
241 B
Bash
Executable file

#!/bin/sh
if [ -z "$1" ]; then
echo "Must supply go version argument"
exit 1
fi
go_version="$(go version)"
echo "Found go version '$go_version'"
if [ -z "$(echo $go_version | grep $1)" ]; then
echo "Unexpected version"
exit 1
fi