From 3647dec90fc9dcd0a539fbd07e14a84887429be7 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Tue, 7 Dec 2021 20:32:27 +0530 Subject: [PATCH] build: updated locale for rbac generation Currently there was an issue related to sorting files in Rbac generation in different platforms Updated the locale to LC_ALL=C so rbac generation can done correctly Closes: https://github.com/rook/rook/issues/9331 Co-authored-by: Blaine Gardner blaine.gardner@redhat.com Signed-off-by: parth-gr --- build/rbac/keep-rbac-yaml.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/rbac/keep-rbac-yaml.sh b/build/rbac/keep-rbac-yaml.sh index 31ddb84d6..40937a3b4 100755 --- a/build/rbac/keep-rbac-yaml.sh +++ b/build/rbac/keep-rbac-yaml.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash set -eEuo pipefail +# setting locate `LC_ALL=C` because different OS do files sorting differently, +# so setting a common behaviour, `C` sorting order is based on the byte values, +# Reference: https://blog.zhimingwang.org/macos-lc_collate-hunt +LC_ALL=C # READS FROM STDIN # WRITES TO STDOUT