]>
Commit | Line | Data |
---|---|---|
facc275a CD |
1 | #!/usr/bin/env bash |
2 | ||
3 | function getHeadRev { | |
4 | git rev-parse HEAD | |
5 | } | |
6 | ||
7 | target_commit="$(getHeadRev)" | |
8 | running_commit=$(clever status | grep running | sed 's/^.*Commit: //' | sed 's/)$//') | |
9 | ||
10 | if [ "${running_commit}" != "${target_commit}" ]; then | |
11 | echo "Deploying commit ${target_commit}" | |
12 | clever deploy --force | |
13 | else | |
14 | echo "${target_commit} is already deployed, nothing to do" | |
15 | fi |