prevent unecesary pre_deploy script executions
This commit is contained in:
parent
f33c57f1a4
commit
8ccda61811
5 changed files with 42 additions and 3 deletions
|
|
@ -2,6 +2,15 @@
|
|||
# shellcheck disable=all
|
||||
# This is a handlerbars template, so ignore issues
|
||||
|
||||
|
||||
checksum_file=".dotter/cache/pre_deploy.checksum"
|
||||
|
||||
if [[ -e "$checksum_file" ]] && sha256sum --check "$checksum_file" >/dev/null 2>&1; then
|
||||
echo "Pre deploy script has not changed, skiping script execution"
|
||||
echo "To override this, remove the checksum file: $checksum_file"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
{{!~ Detect the distribution ~}}
|
||||
{{~ assign "distro" (trim (command_output "awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '\"'")) ~}}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue