Skip to content
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

Always fail to find changed charts with deeply nested (>2 levels) charts_dir #46

Closed
LukeCarrier opened this issue Oct 16, 2020 · 1 comment · Fixed by #47
Closed

Always fail to find changed charts with deeply nested (>2 levels) charts_dir #46

LukeCarrier opened this issue Oct 16, 2020 · 1 comment · Fixed by #47

Comments

@LukeCarrier
Copy link
Contributor

It looks as though this code will fail when the charts directory is nested below another directory:

chart-releaser-action/cr.sh

Lines 202 to 209 in 06d81fa

local fields
if [[ "$charts_dir" == '.' ]]; then
fields='1'
else
fields='1,2'
fi
cut -d '/' -f "$fields" <<< "$changed_files" | uniq | filter_charts

For an example of this, see rook/rook, where charts_dir is cluster/charts:

Would you accept a PR to fix this?

@LukeCarrier
Copy link
Contributor Author

LukeCarrier commented Oct 16, 2020

Looks like cut supports specifying a range (e.g. 1-$x, where $x is the number of path components). We could count the number of / in $charts_dir to get that.

LukeCarrier added a commit to LukeCarrier/chart-releaser-action that referenced this issue Oct 16, 2020
LukeCarrier added a commit to LukeCarrier/chart-releaser-action that referenced this issue Oct 16, 2020
gabriellemadden added a commit to GarnerCorp/Reloader that referenced this issue Oct 20, 2020
gabriellemadden added a commit to GarnerCorp/Reloader that referenced this issue Oct 20, 2020
LukeCarrier added a commit to LukeCarrier/chart-releaser-action that referenced this issue Oct 26, 2020
jsoref pushed a commit to GarnerCorp/Reloader that referenced this issue Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant