aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/fake.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fake.sh')
-rwxr-xr-xtests/fake.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/fake.sh b/tests/fake.sh
index bbb4380..65ff819 100755
--- a/tests/fake.sh
+++ b/tests/fake.sh
@@ -1,15 +1,19 @@
1#!/usr/bin/env bash 1#!/usr/bin/env bash
2 2
3binary="${0/*\/}" 3binary="${0/*\/}"
4fakeCommit="aaa000aaa000aaa000aaa000aaa000aaa000aaa0" 4localCommit="${PRETEND_LOCAL_COMMIT:-aaa000aaa000aaa000aaa000aaa000aaa000aaa0}"
5remoteCommit="${PRETEND_REMOTE_COMMIT:-bbb000bbb000bbb000bbb000bbb000bbb000bbb0}"
5 6
6if [ "${binary}" = "clever" ] && [ "${1}" = "--version" ]; then 7if [ "${binary}" = "clever" ] && [ "${1}" = "--version" ]; then
7 echo "2.6.1" 8 echo "2.6.1"
8elif [ "${binary}" = "clever" ] && [ "${1}" = "activity" ]; then 9elif [ "${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"
11elif [ "${binary}" = "clever" ] && [ "${1}" = "status" ]; then
12 echo "test-app: running (1*pico, Commit: ${remoteCommit})"
10elif [ "${binary}" = "git" ]; then 13elif [ "${binary}" = "git" ]; then
11 echo "${fakeCommit}" 14 echo "${localCommit}"
12else 15else
13 echo "${1}" >> "${binary}-commands"
14 echo "${binary} called with arguments: ${*}" 16 echo "${binary} called with arguments: ${*}"
15fi 17fi
18
19echo "${1}" >> "${binary}-commands"