diff --git a/README.md b/README.md index 198ec58..fcfa9ef 100644 --- a/README.md +++ b/README.md @@ -1,432 +1,7 @@ -# terraform-docs +# Tools Install -[![Build Status](https://github.com/terraform-docs/terraform-docs/workflows/ci/badge.svg)](https://github.com/terraform-docs/terraform-docs/actions) [![GoDoc](https://pkg.go.dev/badge/github.com/terraform-docs/terraform-docs)](https://pkg.go.dev/github.com/terraform-docs/terraform-docs) [![Go Report Card](https://goreportcard.com/badge/github.com/terraform-docs/terraform-docs)](https://goreportcard.com/report/github.com/terraform-docs/terraform-docs) [![Codecov Report](https://codecov.io/gh/terraform-docs/terraform-docs/branch/master/graph/badge.svg)](https://codecov.io/gh/terraform-docs/terraform-docs) [![License](https://img.shields.io/github/license/terraform-docs/terraform-docs)](https://github.com/terraform-docs/terraform-docs/blob/master/LICENSE) [![Latest release](https://img.shields.io/github/v/release/terraform-docs/terraform-docs)](https://github.com/terraform-docs/terraform-docs/releases) +These are setup scripts for tools, SDKs and other things I want on a new system. -![terraform-docs-teaser](./images/terraform-docs-teaser.png) - -## What is terraform-docs - -A utility to generate documentation from Terraform modules in various output formats. - -## Installation - -macOS users can install using [Homebrew]: - -```bash -brew install terraform-docs -``` - -or - -```bash -brew install terraform-docs/tap/terraform-docs -``` - -Windows users can install using [Scoop]: - -```bash -scoop bucket add terraform-docs https://github.com/terraform-docs/scoop-bucket -scoop install terraform-docs -``` - -or [Chocolatey]: - -```bash -choco install terraform-docs -``` - -Stable binaries are also available on the [releases] page. To install, download the -binary for your platform from "Assets" and place this into your `$PATH`: - -```bash -curl -Lo ./terraform-docs.tar.gz https://github.com/terraform-docs/terraform-docs/releases/download/v0.19.0/terraform-docs-v0.19.0-$(uname)-amd64.tar.gz -tar -xzf terraform-docs.tar.gz -chmod +x terraform-docs -mv terraform-docs /usr/local/bin/terraform-docs -``` - -**NOTE:** Windows releases are in `ZIP` format. - -The latest version can be installed using `go install` or `go get`: - -```bash -# go1.17+ -go install github.com/terraform-docs/terraform-docs@v0.19.0 -``` - -```bash -# go1.16 -GO111MODULE="on" go get github.com/terraform-docs/terraform-docs@v0.19.0 -``` - -**NOTE:** please use the latest Go to do this, minimum `go1.16` is required. - -This will put `terraform-docs` in `$(go env GOPATH)/bin`. If you encounter the error -`terraform-docs: command not found` after installation then you may need to either add -that directory to your `$PATH` as shown [here] or do a manual installation by cloning -the repo and run `make build` from the repository which will put `terraform-docs` in: - -```bash -$(go env GOPATH)/src/github.com/terraform-docs/terraform-docs/bin/$(uname | tr '[:upper:]' '[:lower:]')-amd64/terraform-docs -``` - -## Usage - -### Running the binary directly - -To run and generate documentation into README within a directory: - -```bash -terraform-docs markdown table --output-file README.md --output-mode inject /path/to/module -``` - -Check [`output`] configuration for more details and examples. - -### Using docker - -terraform-docs can be run as a container by mounting a directory with `.tf` -files in it and run the following command: - -```bash -docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs:0.19.0 markdown /terraform-docs -``` - -If `output.file` is not enabled for this module, generated output can be redirected -back to a file: - -```bash -docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs:0.19.0 markdown /terraform-docs > doc.md -``` - -**NOTE:** Docker tag `latest` refers to _latest_ stable released version and `edge` -refers to HEAD of `master` at any given point in time. - -### Using GitHub Actions - -To use terraform-docs GitHub Action, configure a YAML workflow file (e.g. -`.github/workflows/documentation.yml`) with the following: - -```yaml -name: Generate terraform docs -on: - - pull_request - -jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.ref }} - - - name: Render terraform docs and push changes back to PR - uses: terraform-docs/gh-actions@main - with: - working-dir: . - output-file: README.md - output-method: inject - git-push: "true" -``` - -Read more about [terraform-docs GitHub Action] and its configuration and -examples. - -### pre-commit hook - -With pre-commit, you can ensure your Terraform module documentation is kept -up-to-date each time you make a commit. - -First [install pre-commit] and then create or update a `.pre-commit-config.yaml` -in the root of your Git repo with at least the following content: - -```yaml -repos: - - repo: https://github.com/terraform-docs/terraform-docs - rev: "v0.19.0" - hooks: - - id: terraform-docs-go - args: ["markdown", "table", "--output-file", "README.md", "./mymodule/path"] -``` - -Then run: - -```bash -pre-commit install -pre-commit install-hooks -``` - -Further changes to your module's `.tf` files will cause an update to documentation -when you make a commit. - -## Configuration - -terraform-docs can be configured with a yaml file. The default name of this file is -`.terraform-docs.yml` and the path order for locating it is: - -1. root of module directory -1. `.config/` folder at root of module directory -1. current directory -1. `.config/` folder at current directory -1. `$HOME/.tfdocs.d/` - -```yaml -formatter: "" # this is required - -version: "" - -header-from: main.tf -footer-from: "" - -recursive: - enabled: false - path: modules - include-main: true - -sections: - hide: [] - show: [] - -content: "" - -output: - file: "" - mode: inject - template: |- - - {{ .Content }} - - -output-values: - enabled: false - from: "" - -sort: - enabled: true - by: name - -settings: - anchor: true - color: true - default: true - description: false - escape: true - hide-empty: false - html: true - indent: 2 - lockfile: true - read-comments: true - required: true - sensitive: true - type: true -``` - -## Content Template - -Generated content can be customized further away with `content` in configuration. -If the `content` is empty the default order of sections is used. - -Compatible formatters for customized content are `asciidoc` and `markdown`. `content` -will be ignored for other formatters. - -`content` is a Go template with following additional variables: - -- `{{ .Header }}` -- `{{ .Footer }}` -- `{{ .Inputs }}` -- `{{ .Modules }}` -- `{{ .Outputs }}` -- `{{ .Providers }}` -- `{{ .Requirements }}` -- `{{ .Resources }}` - -and following functions: - -- `{{ include "relative/path/to/file" }}` - -These variables are the generated output of individual sections in the selected -formatter. For example `{{ .Inputs }}` is Markdown Table representation of _inputs_ -when formatter is set to `markdown table`. - -Note that sections visibility (i.e. `sections.show` and `sections.hide`) takes -precedence over the `content`. - -Additionally there's also one extra special variable avaialble to the `content`: - -- `{{ .Module }}` - -As opposed to the other variables mentioned above, which are generated sections -based on a selected formatter, the `{{ .Module }}` variable is just a `struct` -representing a [Terraform module]. - -````yaml -content: |- - Any arbitrary text can be placed anywhere in the content - - {{ .Header }} - - and even in between sections - - {{ .Providers }} - - and they don't even need to be in the default order - - {{ .Outputs }} - - include any relative files - - {{ include "relative/path/to/file" }} - - {{ .Inputs }} - - # Examples - - ```hcl - {{ include "examples/foo/main.tf" }} - ``` - - ## Resources - - {{ range .Module.Resources }} - - {{ .GetMode }}.{{ .Spec }} ({{ .Position.Filename }}#{{ .Position.Line }}) - {{- end }} -```` - -## Build on top of terraform-docs - -terraform-docs primary use-case is to be utilized as a standalone binary, but -some parts of it is also available publicly and can be imported in your project -as a library. - -```go -import ( - "github.com/terraform-docs/terraform-docs/format" - "github.com/terraform-docs/terraform-docs/print" - "github.com/terraform-docs/terraform-docs/terraform" -) - -// buildTerraformDocs for module root `path` and provided content `tmpl`. -func buildTerraformDocs(path string, tmpl string) (string, error) { - config := print.DefaultConfig() - config.ModuleRoot = path // module root path (can be relative or absolute) - - module, err := terraform.LoadWithOptions(config) - if err != nil { - return "", err - } - - // Generate in Markdown Table format - formatter := format.NewMarkdownTable(config) - - if err := formatter.Generate(module); err != nil { - return "", err - } - - // // Note: if you don't intend to provide additional template for the generated - // // content, or the target format doesn't provide templating (e.g. json, yaml, - // // xml, or toml) you can use `Content()` function instead of `Render()`. - // // `Content()` returns all the sections combined with predefined order. - // return formatter.Content(), nil - - return formatter.Render(tmpl) -} -``` - -## Plugin - -Generated output can be heavily customized with [`content`], but if using that -is not enough for your use-case, you can write your own plugin. - -In order to install a plugin the following steps are needed: - -- download the plugin and place it in `~/.tfdocs.d/plugins` (or `./.tfdocs.d/plugins`) -- make sure the plugin file name is `tfdocs-format-` -- modify [`formatter`] of `.terraform-docs.yml` file to be `` - -**Important notes:** - -- if the plugin file name is different than the example above, terraform-docs won't -be able to to pick it up nor register it properly -- you can only use plugin thorough `.terraform-docs.yml` file and it cannot be used -with CLI arguments - -To create a new plugin create a new repository called `tfdocs-format-` with -following `main.go`: - -```go -package main - -import ( - _ "embed" //nolint - - "github.com/terraform-docs/terraform-docs/plugin" - "github.com/terraform-docs/terraform-docs/print" - "github.com/terraform-docs/terraform-docs/template" - "github.com/terraform-docs/terraform-docs/terraform" -) - -func main() { - plugin.Serve(&plugin.ServeOpts{ - Name: "", - Version: "0.1.0", - Printer: printerFunc, - }) -} - -//go:embed sections.tmpl -var tplCustom []byte - -// printerFunc the function being executed by the plugin client. -func printerFunc(config *print.Config, module *terraform.Module) (string, error) { - tpl := template.New(config, - &template.Item{Name: "custom", Text: string(tplCustom)}, - ) - - rendered, err := tpl.Render("custom", module) - if err != nil { - return "", err - } - - return rendered, nil -} -``` - -Please refer to [tfdocs-format-template] for more details. You can create a new -repository from it by clicking on `Use this template` button. - -## Documentation - -- **Users** - - Read the [User Guide] to learn how to use terraform-docs - - Read the [Formats Guide] to learn about different output formats of terraform-docs - - Refer to [Config File Reference] for all the available configuration options -- **Developers** - - Read [Contributing Guide] before submitting a pull request - -Visit [our website] for all documentation. - -## Community - -- Discuss terraform-docs on [Slack] - -## License - -MIT License - Copyright (c) 2021 The terraform-docs Authors. - -[Chocolatey]: https://www.chocolatey.org -[Config File Reference]: https://terraform-docs.io/user-guide/configuration/ -[`content`]: https://terraform-docs.io/user-guide/configuration/content/ -[Contributing Guide]: CONTRIBUTING.md -[Formats Guide]: https://terraform-docs.io/reference/terraform-docs/ -[`formatter`]: https://terraform-docs.io/user-guide/configuration/formatter/ -[here]: https://golang.org/doc/code.html#GOPATH -[Homebrew]: https://brew.sh -[install pre-commit]: https://pre-commit.com/#install -[`output`]: https://terraform-docs.io/user-guide/configuration/output/ -[releases]: https://github.com/terraform-docs/terraform-docs/releases -[Scoop]: https://scoop.sh/ -[Slack]: https://slack.terraform-docs.io/ -[terraform-docs GitHub Action]: https://github.com/terraform-docs/gh-actions -[Terraform module]: https://pkg.go.dev/github.com/terraform-docs/terraform-docs/terraform#Module -[tfdocs-format-template]: https://github.com/terraform-docs/tfdocs-format-template -[our website]: https://terraform-docs.io/ -[User Guide]: https://terraform-docs.io/user-guide/introduction/ +They should be safe to run at any time (idempotent). Where possible I install via APT, or from an "official" +remote setup script URL. Where binaries are downloaded and un-tarred directly, they will be placed in +`~/.local/bin` diff --git a/argocd.sh b/argocd.sh index 64e0705..15b6e07 100755 --- a/argocd.sh +++ b/argocd.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/argoproj/argo-cd/releases -version="2.10.18" +version="3.1.10" start "Argo CD $version" diff --git a/azure-cli.sh b/azure-cli.sh index 35d4df5..39c659d 100755 --- a/azure-cli.sh +++ b/azure-cli.sh @@ -4,6 +4,15 @@ trap "echo 'error: Script failed: see failed command above'" ERR DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" +# use the highest version used in environment +# KUBECTL_VERSION="latest" +KUBECTL_VERSION="1.33.7" + +# use latest kubelogin version from: +# https://github.com/Azure/kubelogin/releases +# https://github.com/Azure/kubelogin/blob/main/CHANGELOG.md +KUBELOGIN_VERSION="0.2.14" + start 'Azure CLI' # install @@ -15,7 +24,7 @@ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # https://github.com/Azure/kubelogin # use default aks version -sudo az aks install-cli +sudo az aks install-cli --client-version ${KUBECTL_VERSION} --kubelogin-version ${KUBELOGIN_VERSION} # version info command -v kubectl diff --git a/bicep.sh b/bicep.sh index 2deeae2..80e7ba3 100755 --- a/bicep.sh +++ b/bicep.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/Azure/bicep/releases/ -VERSION="v0.24.24" +VERSION="v0.39.26" start "bicep $VERSION" diff --git a/helm-plugins.sh b/helm-plugins.sh index 7165074..4a9afdb 100755 --- a/helm-plugins.sh +++ b/helm-plugins.sh @@ -10,11 +10,11 @@ echo # https://github.com/databus23/helm-diff/releases helm plugin uninstall diff 2>/dev/null -helm plugin install https://github.com/databus23/helm-diff --version v3.9.2 +helm plugin install https://github.com/databus23/helm-diff --version v3.14.1 # https://github.com/helm/helm-mapkubeapis/releases helm plugin uninstall mapkubeapis 2>/dev/null -helm plugin install https://github.com/helm/helm-mapkubeapis --version v0.4.1 +helm plugin install https://github.com/helm/helm-mapkubeapis --version v0.6.1 echo -e "\nHelm Plugins:" helm plugin list diff --git a/helm.sh b/helm.sh index 9e70a34..5c0ac1b 100755 --- a/helm.sh +++ b/helm.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/helm/helm/releases -ver="3.18.2" +ver="3.19.4" start "Helm v$ver" diff --git a/install-common.sh b/install-common.sh index 49715ce..52213cf 100755 --- a/install-common.sh +++ b/install-common.sh @@ -4,18 +4,18 @@ trap "echo 'error: Script failed: see failed command above'" ERR DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" -sudo apt update -y -sudo apt upgrade -y +sudo apt update -y && sudo apt upgrade -y echo -e "\e[34m»»» 🚀 \e[32mInstalling \e[33m'Common Tools'\e[32m ... \e[39m" ~/tools/azure-cli.sh ~/tools/helm.sh +~/tools/k9s.sh ~/tools/kube-tools.sh ~/tools/misc.sh ~/tools/powershell.sh -~/tools/pre-commit.sh -~/tools/python-tools.sh +~/tools/powershell-modules.sh ~/tools/python.sh +~/tools/python-tools.sh ~/tools/terraform-docs.sh ~/tools/terraform.sh ~/tools/velero.sh diff --git a/k9s.sh b/k9s.sh new file mode 100755 index 0000000..fe63723 --- /dev/null +++ b/k9s.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail +trap "echo 'error: Script failed: see failed command above'" ERR +DIR=$(cd "$(dirname "$0")" && pwd) +source "$DIR/.lib.sh" + +# installs k9s https://github.com/derailed/k9s + +# vars +VERSION='0.50.18' +TOOL_NAME='k9s' +DOWNLOAD_URL="https://github.com/derailed/k9s/releases/download/v${VERSION}/k9s_linux_amd64.deb" +DOWNLOAD_DIR=$(mktemp --directory) +DOWNLOAD_PATH="$DOWNLOAD_DIR/k9s.deb" + +# prep +start "$TOOL_NAME" +mkdir -p "$DOWNLOAD_DIR" + +# download +curl --location "$DOWNLOAD_URL" --output "$DOWNLOAD_PATH" + +# install +# sudo dpkg-query -l | grep k9s +# sudo dpkg --remove k9s +sudo dpkg --install "$DOWNLOAD_PATH" + +# cleanup +rm -fr "$DOWNLOAD_DIR" + +# info +end "$TOOL_NAME" 'version' diff --git a/kubectl.sh b/kubectl.sh index 45ae3ae..30050ab 100755 --- a/kubectl.sh +++ b/kubectl.sh @@ -6,8 +6,8 @@ source "$DIR/.lib.sh" # show available versions (only available after adding k8s apt repo): # apt-cache madison kubectl | head -n 30 -VERSION="1.27.8-1.1" -MINOR_VERSION="v1.27" +VERSION="1.33.7-ubuntu24.04u1" +MINOR_VERSION="v1.33" start "kubectl $VERSION" @@ -16,17 +16,13 @@ start "kubectl $VERSION" # Update the apt package index and install packages needed to use the Kubernetes apt repository: sudo apt-get update -sudo apt-get install -y apt-transport-https ca-certificates curl +# apt-transport-https may be a dummy package; if so, you can skip that package +sudo apt-get install -y apt-transport-https ca-certificates curl gnupg -# Download the public signing key for the Kubernetes package repositories. -# The same signing key is used for all repositories so you can disregard the version in the URL +# If the folder `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below. +# sudo mkdir -p -m 755 /etc/apt/keyrings curl -fsSL https://pkgs.k8s.io/core:/stable:/${MINOR_VERSION}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg - -# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list -echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/${MINOR_VERSION}/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list - -# sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg -# echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list +sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg # allow unprivileged APT programs to read this keyring sudo apt-get update sudo apt-get install -y kubectl=$VERSION diff --git a/misc.sh b/misc.sh index ec4ccbb..d4939e6 100755 --- a/misc.sh +++ b/misc.sh @@ -3,10 +3,7 @@ set -euo pipefail trap "echo 'error: Script failed: see failed command above'" ERR # Misc system utilities +# wslu is a set of utilities for WSL to improve integration with Windows +# - required so Azure CLIs can open browser windows for login sudo apt-get update -y -sudo apt-get install -y jq pv unzip tree - -# Install WSL Utilities - Azure CLIs can open browser windows for login -sudo add-apt-repository ppa:wslutilities/wslu -sudo apt update -sudo apt install wslu +sudo apt-get install -y jq pv unzip tree wslu diff --git a/oh-my-posh.sh b/oh-my-posh.sh index ba795ca..104a7ed 100755 --- a/oh-my-posh.sh +++ b/oh-my-posh.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/JanDeDobbeleer/oh-my-posh3/releases -ver="v21.6.0" +ver="v29.0.2" start "oh-my-posh $ver" diff --git a/pluto.sh b/pluto.sh index e3bcefd..7c0fb3d 100755 --- a/pluto.sh +++ b/pluto.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/FairwindsOps/pluto/releases -ver="5.19.0" +ver="5.22.7" start "Pluto $ver" diff --git a/polaris.sh b/polaris.sh index d24740e..23def19 100755 --- a/polaris.sh +++ b/polaris.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/fairwindsops/polaris/releases -ver="8.5.4" +ver="10.1.3" start "Polaris $ver" diff --git a/powershell-modules.sh b/powershell-modules.sh new file mode 100755 index 0000000..6b41ca2 --- /dev/null +++ b/powershell-modules.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail +trap "echo 'error: Script failed: see failed command above'" ERR +DIR=$(cd "$(dirname "$0")" && pwd) +source "$DIR/.lib.sh" + +start "PowerShell Modules" + +# Install modules +pwsh --command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted'" +pwsh --command "Install-Module -Name Az, Microsoft.Graph, Microsoft.Graph.Beta" +pwsh --command "Get-Module -Name Az, Microsoft.Graph, Microsoft.Graph.Beta -ListAvailable" + +end 'pwsh' '--version' diff --git a/powershell.sh b/powershell.sh index 67e399f..0705935 100755 --- a/powershell.sh +++ b/powershell.sh @@ -8,7 +8,10 @@ source "$DIR/.lib.sh" # apt-cache madison powershell | head -n 40 # apt list update && apt list -a powershell -start "PowerShell (ubuntu-2204)" +start "PowerShell" + +################################### +# Prerequisites # Update the list of packages sudo apt-get update @@ -16,23 +19,28 @@ sudo apt-get update # Install pre-requisite packages. sudo apt-get install -y wget apt-transport-https software-properties-common -# Download the Microsoft repository GPG keys -wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" +# Get the version of Ubuntu +source /etc/os-release + +# Download the Microsoft repository keys +wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb -# Register the Microsoft repository GPG keys +# Register the Microsoft repository keys sudo dpkg -i packages-microsoft-prod.deb +# Delete the Microsoft repository keys file +rm packages-microsoft-prod.deb + # Update the list of packages after we added packages.microsoft.com sudo apt-get update +################################### # Install PowerShell sudo apt-get install -y powershell -# Cleanup -rm packages-microsoft-prod.deb - # Install modules -pwsh --command "Install-Module -Name posh-git, PSReadLine -Verbose" -pwsh --command "Get-Module" +pwsh --command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted'" +pwsh --command "Install-Module -Name posh-git, PSReadLine, Microsoft.PowerShell.SecretManagement, Microsoft.PowerShell.SecretStore" +pwsh --command "Get-Module -Name posh-git, PSReadLine, Microsoft.PowerShell.SecretManagement, Microsoft.PowerShell.SecretStore -ListAvailable" end 'pwsh' '--version' diff --git a/pre-commit.sh b/pre-commit.sh deleted file mode 100755 index 2fa2977..0000000 --- a/pre-commit.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -trap "echo 'error: Script failed: see failed command above'" ERR -DIR=$(cd "$(dirname "$0")" && pwd) -source "$DIR/.lib.sh" - -# https://pypi.org/project/pre-commit/#history -VERSION='4.2.0' - -start "pre-commit $VERSION" - -# https://pre-commit.com/#install -pip install --no-input pre-commit==${VERSION} - -end 'pre-commit' '--version' diff --git a/python-tools.sh b/python-tools.sh index 00ab34b..d8e1591 100755 --- a/python-tools.sh +++ b/python-tools.sh @@ -4,10 +4,14 @@ trap "echo 'error: Script failed: see failed command above'" ERR DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" -# https://pypi.org/project/tldr/#history -TLDR_VERSION='3.4.1' # PACKAGE_VERSION='x.x.x' -pip install --no-input \ - tldr==${TLDR_VERSION} \ - # package_name==${PACKAGE_VERSION} \ +# https://pypi.org/project/tldr/#history +TLDR_VERSION='3.4.3' + +# https://pypi.org/project/pre-commit/#history +PRECOMMIT_VERSION='4.5.1' + +python3 -m pip install --break-system-packages --upgrade pip + +pip3 install --break-system-packages --no-input tldr==${TLDR_VERSION} pre-commit==${PRECOMMIT_VERSION} diff --git a/python.sh b/python.sh index b324570..7dd04c0 100755 --- a/python.sh +++ b/python.sh @@ -4,11 +4,7 @@ trap "echo 'error: Script failed: see failed command above'" ERR DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" -# install pip python3 --version -sudo apt update -sudo apt install -y python3-pip -# upgrade pip -python3 -m pip install --upgrade pip -pip --version +sudo apt update +sudo apt install -y python3-pip python3-venv diff --git a/terraform-docs.sh b/terraform-docs.sh index b6cecd9..9a04253 100755 --- a/terraform-docs.sh +++ b/terraform-docs.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/terraform-docs/terraform-docs/releases -VERSION="v0.20.0" +VERSION="v0.21.0" start "terraform-docs $VERSION" diff --git a/terraform.sh b/terraform.sh index c1c3b60..3457c3b 100755 --- a/terraform.sh +++ b/terraform.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/hashicorp/terraform/releases -VERSION="1.12.1" +VERSION="1.13.5" start "Terraform $VERSION" diff --git a/tfsec.sh b/tfsec.sh index 58202fb..55930e3 100755 --- a/tfsec.sh +++ b/tfsec.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/aquasecurity/tfsec/releases -VERSION="v1.28.5" +VERSION="v1.28.14" start "tfsec $VERSION" diff --git a/trivy.sh b/trivy.sh index eb3a603..b2daf80 100755 --- a/trivy.sh +++ b/trivy.sh @@ -6,7 +6,7 @@ source "$DIR/.lib.sh" # https://aquasecurity.github.io/trivy/latest/getting-started/installation/ # https://github.com/aquasecurity/trivy/releases -ver="0.48.3" +ver="0.68.2" start "Trivy $ver" diff --git a/velero.sh b/velero.sh index 380c99f..e9139d8 100755 --- a/velero.sh +++ b/velero.sh @@ -5,7 +5,7 @@ DIR=$(cd "$(dirname "$0")" && pwd) source "$DIR/.lib.sh" # https://github.com/vmware-tanzu/velero/releases -ver="v1.16.1" +ver="v1.17.1" start "Velero $ver"