Fixes the Polaris download URL#1200
Open
piar1989 wants to merge 1 commit into
Open
Conversation
vitorvezani
requested changes
May 22, 2026
vitorvezani
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution @piar1989, to be backwards compatible, I think we will need something like this
if [[ "$INPUT_VERSION" == v* ]]; then
POLARIS_URL=https://github.com/FairwindsOps/polaris/releases/download/$INPUT_VERSION/polaris_$(echo -n $INPUT_VERSION | tr -d "v")_linux_amd64.tar.gz
else
POLARIS_URL=https://github.com/FairwindsOps/polaris/releases/download/$INPUT_VERSION/polaris_linux_amd64.tar.gz
fi
So that if old patterns are used, we still resolve to correct URL, i.e.:
https://github.com/FairwindsOps/polaris/releases/download/4.2.0/polaris_linux_amd64.tar.gz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #1199
Checklist
Description
What's the goal of this PR?
The goal of this PR is to fix a bug in
get_polaris.shwhere the script fails to download the Polaris binary for recent releases due to a mismatch in the release asset naming convention.What changes did you make?
I updated the
POLARIS_URLconstruction insideget_polaris.sh. It now dynamically strips the "v" prefix from the$INPUT_VERSIONvariable usingtr -d "v"specifically for the asset filename part of the URL, while keeping the full tag for the download path.What alternative solution should we consider, if any?
None. This is the most straightforward and lightweight way to handle the version string adjustment directly inside the Bash script without adding external dependencies.