diff --git a/.bash_completion.d/aws b/.bash_completion.d/aws index 8932d45d10665583e0c578f069393e8dc0a44796..44d825d514ce8a4418a291bc1f6428f3494bf59e 100644 --- a/.bash_completion.d/aws +++ b/.bash_completion.d/aws @@ -1 +1 @@ -! command -v aws_completer >/dev/null || complete -C 'aws_completer' aws +complete -C 'aws_completer' aws diff --git a/.bash_completion.d/helm b/.bash_completion.d/helm deleted file mode 100644 index 62800233fb097fc4301d6553068f23abade1ca9d..0000000000000000000000000000000000000000 --- a/.bash_completion.d/helm +++ /dev/null @@ -1 +0,0 @@ -command -v helm >/dev/null && eval "$(helm completion bash)" diff --git a/.bash_completion.d/kompose b/.bash_completion.d/kompose deleted file mode 100644 index e48299b94ead9b1e6ac02d54a8ee0cc574db22fa..0000000000000000000000000000000000000000 --- a/.bash_completion.d/kompose +++ /dev/null @@ -1 +0,0 @@ -command -v kompose >/dev/null && eval "$(kompose completion bash)" diff --git a/.bash_completion.d/kops b/.bash_completion.d/kops deleted file mode 100644 index 0519ac0006986c4d349fd1f8b18d6e2340f8cedb..0000000000000000000000000000000000000000 --- a/.bash_completion.d/kops +++ /dev/null @@ -1 +0,0 @@ -command -v kops >/dev/null && eval "$(kops completion bash)" diff --git a/.bash_completion.d/kubectl b/.bash_completion.d/kubectl deleted file mode 100644 index ac2bc52b8fabc7de6583ddcfeb097bf6933ba70f..0000000000000000000000000000000000000000 --- a/.bash_completion.d/kubectl +++ /dev/null @@ -1 +0,0 @@ -command -v kubectl >/dev/null && eval "$(kubectl completion bash)" diff --git a/.bash_completion.d/minikube b/.bash_completion.d/minikube deleted file mode 100644 index 04ad5660a536ef6580788b563a998b8d9b811025..0000000000000000000000000000000000000000 --- a/.bash_completion.d/minikube +++ /dev/null @@ -1 +0,0 @@ -command -v minikube >/dev/null && eval "$(minikube completion bash)" diff --git a/.bash_completion.d/molecule b/.bash_completion.d/molecule index 05bb4009ae0bfcf190e7dda517c74b8cecf9ecab..4f32049dc62e74524f45dcdfe72f105bf6ba5e05 100644 --- a/.bash_completion.d/molecule +++ b/.bash_completion.d/molecule @@ -24,11 +24,13 @@ _molecule(){ prev=${COMP_WORDS[COMP_CWORD-1]} firstword=$(_get_firstword) - GLOBAL_COMMANDS="syntax create converge destroy idempotence init list login status test verify" + GLOBAL_COMMANDS="syntax check create converge dependency destroy idempotence init list login status test verify" GLOBAL_OPTIONS="-h -v" SYNTAX_OPTIONS="" + CHECK_OPTIONS="" CREATE_OPTIONS="--debug --platform --provider --tags" CONVERGE_OPTIONS="--debug --platform --provider --tags" + DEPENDENCY_OPTIONS="" DESTROY_OPTIONS="--debug --platform --provider --tags" IDEMPOTENCE_OPTIONS="--debug --platform --provider --tags" INIT_OPTIONS="--docker" @@ -42,6 +44,9 @@ _molecule(){ # echo -e "\nprev = $prev, cur = $cur, firstword = $firstword.\n" case "${firstword}" in + check) + complete_options="${CHECK_OPTIONS}" + ;; create) case "${prev}" in --platform) @@ -68,6 +73,9 @@ _molecule(){ ;; esac ;; + dependency) + complete_options="${DEPENDENCY_OPTIONS}" + ;; destroy) case "${prev}" in --platform) @@ -107,6 +115,9 @@ _molecule(){ status) complete_options="${STATUS_OPTIONS}" ;; + syntax) + complete_options="${SYNTAX_OPTIONS}" + ;; test) case "${prev}" in --platform) diff --git a/.bash_completion.d/packer b/.bash_completion.d/packer index e9732a42ff5d97de51b72cf78785221fad1c0cc4..bf0d9f4078ca5ba0bf78383ad1c54d52f3144c0e 100644 --- a/.bash_completion.d/packer +++ b/.bash_completion.d/packer @@ -1 +1 @@ -! command -v packer >/dev/null || complete -C packer packer +complete -C packer packer diff --git a/.bash_completion.d/pandoc b/.bash_completion.d/pandoc deleted file mode 100644 index 183e7c3ff64c411dd0bb757759520686996f8fea..0000000000000000000000000000000000000000 --- a/.bash_completion.d/pandoc +++ /dev/null @@ -1 +0,0 @@ -command -v pandoc > /dev/null && pandoc --bash-completion > /dev/null && eval "$( pandoc --bash-completion )" diff --git a/.bash_completion.d/pipenv b/.bash_completion.d/pipenv deleted file mode 100644 index 7b5469f6e5d4ba3555a67f4d8770e8a7b56a63a7..0000000000000000000000000000000000000000 --- a/.bash_completion.d/pipenv +++ /dev/null @@ -1 +0,0 @@ -command -v pipenv > /dev/null && eval "$(pipenv --completion)" diff --git a/.bash_completion.d/terraform b/.bash_completion.d/terraform index 45cedef248f53af71faaefa34595028cc8df7a96..64ea17f7653d51adc7ab6fa40da62d1f623d806b 100644 --- a/.bash_completion.d/terraform +++ b/.bash_completion.d/terraform @@ -1 +1 @@ -! command -v terraform >/dev/null || complete -C terraform terraform +complete -C terraform terraform diff --git a/.bash_completion.d/vault b/.bash_completion.d/vault index ee68604546aab3d48fb4fb067cac748c682a1f4f..76b631f65b828552a07dd3356650018345670ba6 100644 --- a/.bash_completion.d/vault +++ b/.bash_completion.d/vault @@ -1 +1 @@ -! command -v vault >/dev/null || complete -C vault vault +complete -C vault vault diff --git a/.githooks/post-merge b/.githooks/post-merge index b9cd3f96b312385755f093b1f4e9475bbf264e3f..e2195c88b1f02ad2d04b4f9d61d035bf55393897 100755 --- a/.githooks/post-merge +++ b/.githooks/post-merge @@ -1,14 +1,15 @@ #!/bin/sh set -eu cd "$(git rev-parse --show-toplevel)" -echo Downloading binary and vendored files >> /dev/stderr -make echo Installing Golang apps >> /dev/stderr go get github.com/giantswarm/semver-bump || true go get github.com/nishanths/license || true go get sigs.k8s.io/kind || true echo Installing Python apps >> /dev/stderr python3 -m pip install --user --requirement requirements.txt +echo Downloading binary and vendored files, creating generated files >> /dev/stderr +git clean -fX .bash_completion.d/ +make all echo Installing Git hooks >> /dev/stderr Documents/bin/install-git-hooks echo Loading dconf config >> /dev/stderr diff --git a/Makefile b/Makefile index 024b4a4d84889bc796b7d113964f6ecd2b027e43..75069d778569ce3868cfce5e8e2c9cc9072b03aa 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,8 @@ curl = curl --location --silent --fail download = $(curl) --output $@ all: vendored generated binaries -vendored: .config/pythonrc.py .bash_completion.d/aws .bash_completion.d/docker-compose .bash_completion.d/docker-machine.bash .bash_completion.d/docker-machine.bash .travis/travis.sh -generated: .ssh/config +vendored: .config/pythonrc.py .bash_completion.d/aws .bash_completion.d/docker-compose .bash_completion.d/docker-machine.bash .bash_completion.d/docker-machine.bash .travis/travis.sh .bash_completion.d/molecule +generated: .ssh/config .bash_completion.d/helm .bash_completion.d/kops .bash_completion.d/kubectl .bash_completion.d/kompose .bash_completion.d/minikube .bash_completion.d/pipenv .bash_completion.d/pandoc binaries: .local/share/bfg/bfg.jar .local/bin/rke .local/bin/docker-machine .local/bin/packer .local/bin/terraform .local/bin/vault .local/bin/kubectl .local/bin/kops .local/bin/kompose .local/bin/minikube .local/bin/docker-machine-driver-kvm2 .ssh/config: $(ssh_configs) @@ -83,3 +83,27 @@ binaries: .local/share/bfg/bfg.jar .local/bin/rke .local/bin/docker-machine .loc .local/bin/helm: $(curl) https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-$(os)-$(arch).tar.gz | tar -C .local/bin --wildcards --strip-components=1 -zx */helm chmod +x $@ + +.bash_completion.d/helm: .local/bin/helm + -$$(basename $@) completion bash > $@ + +.bash_completion.d/kompose: .local/bin/kompose + -$$(basename $@) completion bash > $@ + +.bash_completion.d/kops: .local/bin/kops + -$$(basename $@) completion bash > $@ + +.bash_completion.d/kubectl: .local/bin/kubectl + -$$(basename $@) completion bash > $@ + +.bash_completion.d/minikube: .local/bin/minikube + -$$(basename $@) completion bash > $@ + +.bash_completion.d/molecule: + $(download) https://raw.githubusercontent.com/ansible/molecule/1.25.1/asset/bash_completion/molecule.bash-completion.sh + +.bash_completion.d/pipenv: + -bash -c 'pipenv --completion > $@' + +.bash_completion.d/pandoc: + -pandoc --bash-completion > $@