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