Skip to content

Commit

Permalink
Merge pull request #61 from brhahlen/dev
Browse files Browse the repository at this point in the history
3.2.0
  • Loading branch information
brhahlen authored Sep 20, 2023
2 parents 531ef38 + 2af07dc commit d43720f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set -m

# VERSION
export DC_VERSION=v3.1.3
export DC_VERSION=v3.2.0-dev

###### VARIABLES
if [[ -z "${DC_DIR}" ]]; then
Expand Down Expand Up @@ -97,7 +97,7 @@ function tmp_dir_stack_files(){
# TMP_STACK FILES AGE
function tmp_stack_files_age(){
tmp_dir_stack_files
for STACK in $(find "${DC_DIR}" -name docker-compose.yml -printf '%h \n' | sort -u);
for STACK in $(find "${DC_DIR}" \(-name compose.yaml -or -name compose.yml -or -name docker-compose.yaml -or -name docker-compose.yml \) -printf '%h \n' | sort -u);
do
STACK_NAME=$(basename "${STACK}")
verbose_stack "${STACK}" "${STACK_NAME}"
Expand Down Expand Up @@ -192,7 +192,7 @@ function list(){
tmp_stack_files_age
printf "Listing Stacks and Services \n"
printf "=================================== \n"
for STACK in $(find "${DC_DIR}" -name docker-compose.yml -printf '%h\n' | sort -u);
for STACK in $(find "${DC_DIR}" \( -name compose.yaml -or -name compose.yml -or -name docker-compose.yaml -or -name docker-compose.yml \) -printf '%h\n' | sort -u);
do
STACK_NAME=$(basename "${STACK}")
DC_CMD_PARAM="config --services | tee ${TMP_DIR}/${STACK_NAME}"
Expand Down
6 changes: 3 additions & 3 deletions dc-completion
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2022 - 2023 Ben Hählen
# This is the completion file for `dc`
##############
# Version 3.1.3
# Version 3.2.0
##############
_dc_completions()
{
Expand All @@ -26,7 +26,7 @@ _dc_completions()
# Based on the arguments, we can run functions
case "$cmd" in
up|down|restart-stack-hard|restart-stack-soft|logs-stack)
local STACKS=$(for STACK in $(find "${DC_DIR}" -name docker-compose.yml -printf '%h\n' | sort -u | rev | cut -d / -f 1 | rev); do echo "${STACK}" ; done )
local STACKS=$(for STACK in $(find "${DC_DIR}" \( -name compose.yaml -or -name compose.yml -or -name docker-compose.yaml -or -name docker-compose.yml \) -printf '%h\n' | sort -u | rev | cut -d / -f 1 | rev); do echo "${STACK}" ; done )
if [ ! "$cmd" == "logs-stack" ]; then
STACKS="all ${STACKS}"
fi
Expand All @@ -35,7 +35,7 @@ _dc_completions()
;;
start|stop|restart|pull|logs)
# We might need to create the tmp-files, so reusing the command from dc, however, this is duplicating stuff, which is not nice, but for a MVP, it works
for STACK in $(find "${DC_DIR}" -name docker-compose.yml -printf '%h\n' | sort -u);
for STACK in $(find "${DC_DIR}" \( -name compose.yaml -or -name compose.yml -or -name docker-compose.yaml -or -name docker-compose.yml \) -printf '%h\n' | sort -u);
do
STACK_NAME=$(echo "${STACK}" | rev | cut -d / -f 1 | rev)
ENV="${DC_DIR}/.env"
Expand Down

0 comments on commit d43720f

Please sign in to comment.