Skip to content

fix: check for helm secrets version and update it #1927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion bin/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,26 @@ go install github.com/noqcks/gucci@latest
go install github.com/plexsystems/konstraint@latest
npm install -g json-dereference-cli

# Desired version
helm_secrets_target_version="4.6.2"

# Get the installed version of helm-secrets
helm_secrets_installed_version=$(helm plugin list | awk '/secrets/ {print $2}')

# Compare versions and update if necessary
if [ -z "$helm_secrets_installed_version" ]; then
echo "helm-secrets is not installed. Installing version $helm_secrets_target_version..."
helm plugin install https://github.com/jkroepke/helm-secrets --version "$helm_secrets_target_version"
elif [ "$(printf '%s\n' "$helm_secrets_installed_version" "$helm_secrets_target_version" | sort -V | head -n1)" != "$helm_secrets_target_version" ]; then
echo "Updating helm-secrets from version $helm_secrets_installed_version to $helm_secrets_target_version..."
helm plugin uninstall secrets
helm plugin install https://github.com/jkroepke/helm-secrets --version "$helm_secrets_target_version"
else
echo "helm-secrets is up-to-date (version $helm_secrets_installed_version)."
fi

helm plugin install https://github.com/databus23/helm-diff.git || echo "Skipping helm-diff"
helm plugin install https://github.com/jkroepke/helm-secrets.git --version v3.15.0 || echo "Skipping helm-secret"


echo "Set shell rc file:"
echo 'echo export PATH="$HOME/go/bin:$PATH" >> $HOME/.zshrc'
Expand Down