Skip to content

Commit

Permalink
Merge pull request #181 from szymonos/dev
Browse files Browse the repository at this point in the history
Merge dev to main
  • Loading branch information
szymonos authored Dec 17, 2024
2 parents 41fc9ef + 671a221 commit 3c9b6d8
Show file tree
Hide file tree
Showing 37 changed files with 158 additions and 76 deletions.
5 changes: 4 additions & 1 deletion .assets/provision/install_argorolloutscli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'argoproj' --repo 'argo-rollouts')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
6 changes: 4 additions & 2 deletions .assets/provision/install_azurecli_uv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ version = "1.0.0"
requires-python = ">=3.12.8,<3.13"
dependencies = [
"azure-cli",
"setuptools",
"pip",
"certifi",
"idna",
"oauthlib",
"pip",
"pycparser",
"requests_oauthlib",
"setuptools",
"wrapt",
]
[tool.uv]
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_bat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'sharkdp' --repo 'bat')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'Homebrew' --repo 'brew')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_crictl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'kubernetes-sigs' --repo 'cri-tools')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_etcdctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'etcd-io' --repo 'etcd')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_exa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'ogham' --repo 'exa')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_eza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'eza-community' --repo 'eza')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_fastfetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'fastfetch-cli' --repo 'fastfetch')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_flux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'fluxcd' --repo 'flux2')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_fonts_cascadiacode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'microsoft' --repo 'cascadia-code')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_fzf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'junegunn' --repo 'fzf')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_gh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'cli' --repo 'cli')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'helm' --repo 'helm')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_k3d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'k3d-io' --repo 'k3d')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_k9s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'derailed' --repo 'k9s')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_kubectx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'ahmetb' --repo 'kubectx')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_kubelogin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'Azure' --repo 'kubelogin')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_kustomize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'kubernetes-sigs' --repo 'kustomize')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'kubernetes' --repo 'minikube')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_nerdctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'containerd' --repo 'nerdctl')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_pwsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'PowerShell' --repo 'PowerShell')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_ripgrep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'BurntSushi' --repo 'ripgrep')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'hashicorp' --repo 'terraform')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_terrascan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'tenable' --repo 'terrascan')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_tfswitch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'warrensbox' --repo 'terraform-switcher')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_uv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'astral-sh' --repo 'uv')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
5 changes: 4 additions & 1 deletion .assets/provision/install_yq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ REL=$1
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'mikefarah' --repo 'yq')"
[ -n "$REL" ] || exit 1
if [ -z "$REL" ]; then
printf "\e[31mFailed to get the latest version of $APP.\e[0m\n" >&2
exit 1
fi
fi
# return the release
echo $REL
Expand Down
8 changes: 4 additions & 4 deletions .assets/provision/source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ get_gh_release_latest() {
fi
fi

# Check if the key 'tag_name' exists in the API response
tag_name="$(echo "$api_response" | jq -r 'try .tag_name catch empty')"
if [ 'null' != "$tag_name" ]; then
# Check if 'tag_name' exists
if echo "$api_response" | jq -e '.tag_name | select(. != null and . != "")' >/dev/null; then
tag_name="$(echo "$api_response" | jq -r '.tag_name')"
rel="$(echo $tag_name | sed -E 's/[^0-9]*([0-9]+\.[0-9]+\.[0-9]+)/\1/')"
if [ -n "$rel" ]; then
if [ -n "$asset" ]; then
Expand All @@ -148,7 +148,7 @@ get_gh_release_latest() {
fi
return 0
else
printf "\e[31mError: Returned tag_name doesn't conform to the semantic versioning.\e[0m\n" >&2
printf "\e[31mError: Returned tag_name doesn't conform to the semantic versioning ($tag_name).\e[0m\n" >&2
return 1
fi
else
Expand Down
5 changes: 3 additions & 2 deletions .assets/scripts/modules_update.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#Requires -PSEdition Core
#!/usr/bin/pwsh -nop
#Requires -PSEdition Core -Version 7.3
<#
.SYNOPSIS
Update repository modules from ps-modules.
Expand Down Expand Up @@ -98,6 +99,6 @@ process {
}
}

end {
clean {
Pop-Location
}
4 changes: 2 additions & 2 deletions .assets/scripts/vg_cacert_fix.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Requires -RunAsAdministrator
#Requires -PSEdition Core
#Requires -PSEdition Core -Version 7.3
<#
.SYNOPSIS
Fix self signed certificate error in Vagrant by installing certificates from chain into Vagrant\embedded directory.
Expand Down Expand Up @@ -65,7 +65,7 @@ process {
}
}

end {
clean {
# return to the original location
Pop-Location
}
Loading

0 comments on commit 3c9b6d8

Please sign in to comment.