aboutsummaryrefslogblamecommitdiffhomepage
path: root/tests/fake.sh
blob: 65ff819ffd4b538c71d5dc91ed89829dc9fbf673 (plain) (tree)
1
2
3
4
5
6
7
8
9


                   

                                                                                 

                                                               
                
                                                                


                                                                                
                                  
                         


                                                

                                   
#!/usr/bin/env bash

binary="${0/*\/}"
localCommit="${PRETEND_LOCAL_COMMIT:-aaa000aaa000aaa000aaa000aaa000aaa000aaa0}"
remoteCommit="${PRETEND_REMOTE_COMMIT:-bbb000bbb000bbb000bbb000bbb000bbb000bbb0}"

if [ "${binary}" = "clever" ] && [ "${1}" = "--version" ]; then
    echo "2.6.1"
elif [ "${binary}" = "clever" ] && [ "${1}" = "activity" ]; then
    echo "2020-02-02T20:20:02+02:00  OK         DEPLOY     ${remoteCommit}  Git"
elif [ "${binary}" = "clever" ] && [ "${1}" = "status" ]; then
    echo "test-app: running (1*pico,  Commit: ${remoteCommit})"
elif [ "${binary}" = "git" ]; then
    echo "${localCommit}"
else
    echo "${binary} called with arguments: ${*}"
fi

echo "${1}" >> "${binary}-commands"