Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created August 2, 2018 12:29
Show Gist options
  • Save eminetto/8819789aac282320fb1396a201a40969 to your computer and use it in GitHub Desktop.
Save eminetto/8819789aac282320fb1396a201a40969 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
SHOULD_BUILD=0
shouldIBuild() {
if [[ "${DRONE_DEPLOY_TO}" ]]; then
SHOULD_BUILD=1
else
. scripts/detectChangedFolders.sh
detect_changed_folders
toW=($(echo "$watch" | tr ' ' '\n'))
changed=($(echo "$changed_components"))
for i in "${toW[@]}"
do
for j in "${changed[@]}"
do
if [[ $i = $j ]]; then
SHOULD_BUILD=1
fi
done
done
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment