Skip to content

Commit

Permalink
Merge pull request #24 from boesing/feature/use-empty-command-for-not…
Browse files Browse the repository at this point in the history
…hing-to-check

feat: use empty command for nothing to check
  • Loading branch information
weierophinney authored Apr 8, 2021
2 parents 1fe77c2 + 42b7f27 commit a968871
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ The JSON string should represent an object with the following information:
{
"php": "string PHP minor version to run against",
"extensions": [
"extension names to install; names are from the ondrej PHP repository, minus the php{VERSION}- prefix",
"extension names to install; names are from the ondrej PHP repository, minus the php{VERSION}- prefix"
],
"ini": [
"php.ini directives, one per element; e.g. 'memory_limit=-1'",
"php.ini directives, one per element; e.g. 'memory_limit=-1'"
],
"dependencies": "dependencies to test against; one of lowest, locked, latest",
"command": "command to run to perform the check",
"command": "command to run to perform the check (empty in case you dont want to excecute any command)"
}
```

Expand Down
8 changes: 4 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ JOB=$1
echo "Received job: ${JOB}"

COMMAND=$(echo "${JOB}" | jq -r '.command')
if [[ "${COMMAND}" == "" ]];then
echo "Missing command in job; nothing to run"
help
exit 1

if [[ "${$COMMAND}" == ""];then
echo "Command is empty; nothing to run"
exit 0
fi

PHP=$(echo "${JOB}" | jq -r '.php')
Expand Down

0 comments on commit a968871

Please sign in to comment.