From 705bec72c8cd1ef2879a16d5514b45103e8775cf Mon Sep 17 00:00:00 2001 From: "jakub.coufal" Date: Mon, 24 Apr 2023 14:22:31 +0200 Subject: [PATCH 1/2] Improve release and regenerate docs --- .github/workflows/release.yml | 9 +++-- docs/git2kube.md | 1 + docs/git2kube_completion.md | 30 +++++++++++++++ docs/git2kube_completion_bash.md | 49 +++++++++++++++++++++++++ docs/git2kube_completion_fish.md | 40 ++++++++++++++++++++ docs/git2kube_completion_powershell.md | 37 +++++++++++++++++++ docs/git2kube_completion_zsh.md | 51 ++++++++++++++++++++++++++ docs/git2kube_gendoc.md | 4 -- docs/git2kube_load.md | 4 -- docs/git2kube_load_configmap.md | 4 -- docs/git2kube_load_folder.md | 4 -- docs/git2kube_load_secret.md | 4 -- docs/git2kube_version.md | 4 -- docs/git2kube_watch.md | 4 -- docs/git2kube_watch_configmap.md | 4 -- docs/git2kube_watch_folder.md | 4 -- docs/git2kube_watch_secret.md | 4 -- hooks/build | 3 -- 18 files changed, 213 insertions(+), 47 deletions(-) create mode 100644 docs/git2kube_completion.md create mode 100644 docs/git2kube_completion_bash.md create mode 100644 docs/git2kube_completion_fish.md create mode 100644 docs/git2kube_completion_powershell.md create mode 100644 docs/git2kube_completion_zsh.md delete mode 100644 hooks/build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc01bac..8aed1cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: env: REGISTRY: ghcr.io + BINARY_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }} TAG: ${{ github.ref_name }} @@ -30,14 +31,14 @@ jobs: GOARCH: ${{ matrix.goarch }} shell: bash run: | - GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o git2kube -ldflags '-w -s -X 'github.com/wandera/git2kube/cmd.Version=${{ env.TAG }} \ + GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ${{ env.BINARY_NAME }} -ldflags '-w -s -X 'github.com/wandera/${{ env.BINARY_NAME }}/cmd.Version=${{ env.TAG }} \ && mkdir dist \ - && mv git2kube dist/git2kube \ - && tar -czvf git2kube-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz -C dist/ . + && mv ${{ env.BINARY_NAME }} dist/${{ env.BINARY_NAME }} \ + && tar -czvf ${{ env.BINARY_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz -C dist/ . - name: Release uses: wandera/action-gh-release@v1 with: - files: git2kube-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz + files: ${{ env.BINARY_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz release-docker-image: runs-on: ubuntu-latest diff --git a/docs/git2kube.md b/docs/git2kube.md index 23be69b..e7a6e3a 100644 --- a/docs/git2kube.md +++ b/docs/git2kube.md @@ -15,6 +15,7 @@ Commandline tool for loading files from git repository into K8s ConfigMap ### SEE ALSO +* [git2kube completion](git2kube_completion.md) - Generate the autocompletion script for the specified shell * [git2kube gendoc](git2kube_gendoc.md) - Generates documentation for this tool in Markdown format * [git2kube load](git2kube_load.md) - Loads files from git repository into target * [git2kube version](git2kube_version.md) - Print the version information diff --git a/docs/git2kube_completion.md b/docs/git2kube_completion.md new file mode 100644 index 0000000..c24d277 --- /dev/null +++ b/docs/git2kube_completion.md @@ -0,0 +1,30 @@ +## git2kube completion + +Generate the autocompletion script for the specified shell + +### Synopsis + +Generate the autocompletion script for git2kube for the specified shell. +See each sub-command's help for details on how to use the generated script. + + +### Options + +``` + -h, --help help for completion +``` + +### Options inherited from parent commands + +``` + -l, --log-level string command log level (options: [panic fatal error warning info debug trace]) (default "info") +``` + +### SEE ALSO + +* [git2kube](git2kube.md) - Git to ConfigMap conversion tool +* [git2kube completion bash](git2kube_completion_bash.md) - Generate the autocompletion script for bash +* [git2kube completion fish](git2kube_completion_fish.md) - Generate the autocompletion script for fish +* [git2kube completion powershell](git2kube_completion_powershell.md) - Generate the autocompletion script for powershell +* [git2kube completion zsh](git2kube_completion_zsh.md) - Generate the autocompletion script for zsh + diff --git a/docs/git2kube_completion_bash.md b/docs/git2kube_completion_bash.md new file mode 100644 index 0000000..f30371f --- /dev/null +++ b/docs/git2kube_completion_bash.md @@ -0,0 +1,49 @@ +## git2kube completion bash + +Generate the autocompletion script for bash + +### Synopsis + +Generate the autocompletion script for the bash shell. + +This script depends on the 'bash-completion' package. +If it is not installed already, you can install it via your OS's package manager. + +To load completions in your current shell session: + + source <(git2kube completion bash) + +To load completions for every new session, execute once: + +#### Linux: + + git2kube completion bash > /etc/bash_completion.d/git2kube + +#### macOS: + + git2kube completion bash > $(brew --prefix)/etc/bash_completion.d/git2kube + +You will need to start a new shell for this setup to take effect. + + +``` +git2kube completion bash +``` + +### Options + +``` + -h, --help help for bash + --no-descriptions disable completion descriptions +``` + +### Options inherited from parent commands + +``` + -l, --log-level string command log level (options: [panic fatal error warning info debug trace]) (default "info") +``` + +### SEE ALSO + +* [git2kube completion](git2kube_completion.md) - Generate the autocompletion script for the specified shell + diff --git a/docs/git2kube_completion_fish.md b/docs/git2kube_completion_fish.md new file mode 100644 index 0000000..4dc01d2 --- /dev/null +++ b/docs/git2kube_completion_fish.md @@ -0,0 +1,40 @@ +## git2kube completion fish + +Generate the autocompletion script for fish + +### Synopsis + +Generate the autocompletion script for the fish shell. + +To load completions in your current shell session: + + git2kube completion fish | source + +To load completions for every new session, execute once: + + git2kube completion fish > ~/.config/fish/completions/git2kube.fish + +You will need to start a new shell for this setup to take effect. + + +``` +git2kube completion fish [flags] +``` + +### Options + +``` + -h, --help help for fish + --no-descriptions disable completion descriptions +``` + +### Options inherited from parent commands + +``` + -l, --log-level string command log level (options: [panic fatal error warning info debug trace]) (default "info") +``` + +### SEE ALSO + +* [git2kube completion](git2kube_completion.md) - Generate the autocompletion script for the specified shell + diff --git a/docs/git2kube_completion_powershell.md b/docs/git2kube_completion_powershell.md new file mode 100644 index 0000000..ff975da --- /dev/null +++ b/docs/git2kube_completion_powershell.md @@ -0,0 +1,37 @@ +## git2kube completion powershell + +Generate the autocompletion script for powershell + +### Synopsis + +Generate the autocompletion script for powershell. + +To load completions in your current shell session: + + git2kube completion powershell | Out-String | Invoke-Expression + +To load completions for every new session, add the output of the above command +to your powershell profile. + + +``` +git2kube completion powershell [flags] +``` + +### Options + +``` + -h, --help help for powershell + --no-descriptions disable completion descriptions +``` + +### Options inherited from parent commands + +``` + -l, --log-level string command log level (options: [panic fatal error warning info debug trace]) (default "info") +``` + +### SEE ALSO + +* [git2kube completion](git2kube_completion.md) - Generate the autocompletion script for the specified shell + diff --git a/docs/git2kube_completion_zsh.md b/docs/git2kube_completion_zsh.md new file mode 100644 index 0000000..b8f95d5 --- /dev/null +++ b/docs/git2kube_completion_zsh.md @@ -0,0 +1,51 @@ +## git2kube completion zsh + +Generate the autocompletion script for zsh + +### Synopsis + +Generate the autocompletion script for the zsh shell. + +If shell completion is not already enabled in your environment you will need +to enable it. You can execute the following once: + + echo "autoload -U compinit; compinit" >> ~/.zshrc + +To load completions in your current shell session: + + source <(git2kube completion zsh) + +To load completions for every new session, execute once: + +#### Linux: + + git2kube completion zsh > "${fpath[1]}/_git2kube" + +#### macOS: + + git2kube completion zsh > $(brew --prefix)/share/zsh/site-functions/_git2kube + +You will need to start a new shell for this setup to take effect. + + +``` +git2kube completion zsh [flags] +``` + +### Options + +``` + -h, --help help for zsh + --no-descriptions disable completion descriptions +``` + +### Options inherited from parent commands + +``` + -l, --log-level string command log level (options: [panic fatal error warning info debug trace]) (default "info") +``` + +### SEE ALSO + +* [git2kube completion](git2kube_completion.md) - Generate the autocompletion script for the specified shell + diff --git a/docs/git2kube_gendoc.md b/docs/git2kube_gendoc.md index d0cb81f..65cb3f7 100644 --- a/docs/git2kube_gendoc.md +++ b/docs/git2kube_gendoc.md @@ -2,10 +2,6 @@ Generates documentation for this tool in Markdown format -### Synopsis - -Generates documentation for this tool in Markdown format - ``` git2kube gendoc [flags] ``` diff --git a/docs/git2kube_load.md b/docs/git2kube_load.md index 70cba04..df04bd5 100644 --- a/docs/git2kube_load.md +++ b/docs/git2kube_load.md @@ -2,10 +2,6 @@ Loads files from git repository into target -### Synopsis - -Loads files from git repository into target - ### Options ``` diff --git a/docs/git2kube_load_configmap.md b/docs/git2kube_load_configmap.md index 152b6bb..ad6f0cb 100644 --- a/docs/git2kube_load_configmap.md +++ b/docs/git2kube_load_configmap.md @@ -2,10 +2,6 @@ Loads files from git repository into ConfigMap -### Synopsis - -Loads files from git repository into ConfigMap - ``` git2kube load configmap [flags] ``` diff --git a/docs/git2kube_load_folder.md b/docs/git2kube_load_folder.md index 12c52bd..12dae5c 100644 --- a/docs/git2kube_load_folder.md +++ b/docs/git2kube_load_folder.md @@ -2,10 +2,6 @@ Loads files from git repository into Folder -### Synopsis - -Loads files from git repository into Folder - ``` git2kube load folder [flags] ``` diff --git a/docs/git2kube_load_secret.md b/docs/git2kube_load_secret.md index 03f422d..d0542f3 100644 --- a/docs/git2kube_load_secret.md +++ b/docs/git2kube_load_secret.md @@ -2,10 +2,6 @@ Loads files from git repository into Secret -### Synopsis - -Loads files from git repository into Secret - ``` git2kube load secret [flags] ``` diff --git a/docs/git2kube_version.md b/docs/git2kube_version.md index 69a2127..c6c81c6 100644 --- a/docs/git2kube_version.md +++ b/docs/git2kube_version.md @@ -2,10 +2,6 @@ Print the version information -### Synopsis - -Print the version information - ``` git2kube version [flags] ``` diff --git a/docs/git2kube_watch.md b/docs/git2kube_watch.md index db96384..802c8d7 100644 --- a/docs/git2kube_watch.md +++ b/docs/git2kube_watch.md @@ -2,10 +2,6 @@ Runs watcher that periodically check the provided repository -### Synopsis - -Runs watcher that periodically check the provided repository - ### Options ``` diff --git a/docs/git2kube_watch_configmap.md b/docs/git2kube_watch_configmap.md index b240157..aec4e1f 100644 --- a/docs/git2kube_watch_configmap.md +++ b/docs/git2kube_watch_configmap.md @@ -2,10 +2,6 @@ Runs watcher that periodically check the provided repository and updates K8s ConfigMap accordingly -### Synopsis - -Runs watcher that periodically check the provided repository and updates K8s ConfigMap accordingly - ``` git2kube watch configmap [flags] ``` diff --git a/docs/git2kube_watch_folder.md b/docs/git2kube_watch_folder.md index 73c593a..c938cca 100644 --- a/docs/git2kube_watch_folder.md +++ b/docs/git2kube_watch_folder.md @@ -2,10 +2,6 @@ Runs watcher that periodically check the provided repository and updates target folder accordingly -### Synopsis - -Runs watcher that periodically check the provided repository and updates target folder accordingly - ``` git2kube watch folder [flags] ``` diff --git a/docs/git2kube_watch_secret.md b/docs/git2kube_watch_secret.md index 5b49757..731feca 100644 --- a/docs/git2kube_watch_secret.md +++ b/docs/git2kube_watch_secret.md @@ -2,10 +2,6 @@ Runs watcher that periodically check the provided repository and updates K8s Secret accordingly -### Synopsis - -Runs watcher that periodically check the provided repository and updates K8s Secret accordingly - ``` git2kube watch secret [flags] ``` diff --git a/hooks/build b/hooks/build deleted file mode 100644 index f204d16..0000000 --- a/hooks/build +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker build -t $IMAGE_NAME . --build-arg CACHE_TAG=${IMAGE_NAME#*:} From e9ec9a894f4efe81dcfb739e9ed4096870c36b59 Mon Sep 17 00:00:00 2001 From: "jakub.coufal" Date: Mon, 24 Apr 2023 14:58:23 +0200 Subject: [PATCH 2/2] Add dependabot settings --- .github/dependabot.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5862ef4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,23 @@ +version: 2 +updates: +- package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" + reviewers: + - "wandera/delta" + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + reviewers: + - "wandera/delta" + +- package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + reviewers: + - "wandera/delta" +