diff options
Diffstat (limited to 'tests/fake.sh')
-rwxr-xr-x | tests/fake.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/fake.sh b/tests/fake.sh index bbb4380..0303b61 100755 --- a/tests/fake.sh +++ b/tests/fake.sh | |||
@@ -1,14 +1,17 @@ | |||
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | 2 | ||
3 | binary="${0/*\/}" | 3 | binary="${0/*\/}" |
4 | fakeCommit="aaa000aaa000aaa000aaa000aaa000aaa000aaa0" | 4 | localCommit="${PRETEND_LOCAL_COMMIT:-aaa000aaa000aaa000aaa000aaa000aaa000aaa0}" |
5 | remoteCommit="${PRETEND_REMOTE_COMMIT:-bbb000bbb000bbb000bbb000bbb000bbb000bbb0}" | ||
5 | 6 | ||
6 | if [ "${binary}" = "clever" ] && [ "${1}" = "--version" ]; then | 7 | if [ "${binary}" = "clever" ] && [ "${1}" = "--version" ]; then |
7 | echo "2.6.1" | 8 | echo "2.6.1" |
8 | elif [ "${binary}" = "clever" ] && [ "${1}" = "activity" ]; then | 9 | elif [ "${binary}" = "clever" ] && [ "${1}" = "activity" ]; then |
9 | echo "2020-02-02T20:20:02+02:00 OK DEPLOY ${fakeCommit} Git" | 10 | echo "2020-02-02T20:20:02+02:00 OK DEPLOY ${remoteCommit} Git" |
11 | elif [ "${binary}" = "clever" ] && [ "${1}" = "status" ]; then | ||
12 | echo "test-app: running (1*pico, Commit: ${remoteCommit})" | ||
10 | elif [ "${binary}" = "git" ]; then | 13 | elif [ "${binary}" = "git" ]; then |
11 | echo "${fakeCommit}" | 14 | echo "${localCommit}" |
12 | else | 15 | else |
13 | echo "${1}" >> "${binary}-commands" | 16 | echo "${1}" >> "${binary}-commands" |
14 | echo "${binary} called with arguments: ${*}" | 17 | echo "${binary} called with arguments: ${*}" |