aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/fake.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fake.sh')
-rwxr-xr-xtests/fake.sh9
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
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" 16 echo "${1}" >> "${binary}-commands"
14 echo "${binary} called with arguments: ${*}" 17 echo "${binary} called with arguments: ${*}"