mirror of
https://github.com/actions/setup-java.git
synced 2025-04-19 17:36:45 +00:00
standardize workflow test pattern
This commit is contained in:
parent
f63b906f27
commit
60cf21b5e7
3 changed files with 84 additions and 32 deletions
13
__tests__/verify-java.sh
Executable file
13
__tests__/verify-java.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Must supply java version argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
java_version="$(java -version 2>&1)"
|
||||
echo "Found java version: $java_version"
|
||||
if [ -z "$(echo $java_version | grep --fixed-strings $1)" ]; then
|
||||
echo "Unexpected version"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue