mirror of https://github.com/grafana/grafana.git
devenv: fix volumes section when sources don't contain one (#111563)
This commit is contained in:
parent
397e4957f0
commit
dc626e897b
|
@ -64,13 +64,6 @@ for dir in $@; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
volume_files=$($blocks_dir/**/$compose_volume_section_create_flag)
|
|
||||||
|
|
||||||
if [[ ${#volume_files[@]} -ne 0 ]]; then
|
|
||||||
echo "Adding volume section to $compose_file"
|
|
||||||
cat $compose_volume_section_file >> $compose_file
|
|
||||||
echo "" >> $compose_file
|
|
||||||
|
|
||||||
for dir in $@; do
|
for dir in $@; do
|
||||||
current_dir=$blocks_dir/$dir
|
current_dir=$blocks_dir/$dir
|
||||||
if [ ! -d "$current_dir" ]; then
|
if [ ! -d "$current_dir" ]; then
|
||||||
|
@ -80,11 +73,15 @@ if [[ ${#volume_files[@]} -ne 0 ]]; then
|
||||||
|
|
||||||
|
|
||||||
if [ -f $current_dir/$compose_volume_section_create_flag ]; then
|
if [ -f $current_dir/$compose_volume_section_create_flag ]; then
|
||||||
|
if [ -z ${inserted_volume_section_start+x} ]; then
|
||||||
|
echo "Adding volume section to $compose_file"
|
||||||
|
cat $compose_volume_section_file >> $compose_file
|
||||||
|
echo "" >> $compose_file
|
||||||
|
inserted_volume_section_start=true
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Adding volume for $current_dir to $compose_file"
|
echo "Adding volume for $current_dir to $compose_file"
|
||||||
echo " $dir-data-volume:" >> $compose_file
|
echo " $dir-data-volume:" >> $compose_file
|
||||||
echo "" >> $compose_file
|
echo "" >> $compose_file
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
cat $compose_file
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue