Skip to content

Commit 2178184

Browse files
committed
fix sort order
1 parent aa06873 commit 2178184

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/update_deleted_packages.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
# `--deleted_packages` flag.
1919

2020
set -euo pipefail
21-
set -x
2221

2322
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
2423
ROOT_DIR="$DIR/.."
@@ -40,7 +39,9 @@ found_packages() {
4039
# Update .bazelrc
4140
update_bazelrc() {
4241
local packages
43-
packages=$(found_packages | sort -u)
42+
# Set LC_COLLATE so that "/" sorts before "_", which makes
43+
# for slightly nicer ordering with file paths
44+
packages=$(found_packages | LC_COLLATE=C sort | uniq)
4445

4546
local start_marker="# GENERATED_DELETED_PACKAGES_START"
4647
local end_marker="# GENERATED_DELETED_PACKAGES_END"
@@ -53,7 +54,6 @@ update_bazelrc() {
5354
sed "/$start_marker/q" "$BAZELRC" > "$tmpfile"
5455

5556
# Write the generated packages
56-
echo "$start_marker" >> "$tmpfile"
5757
for pkg in $packages; do
5858
echo "common --deleted_packages=$pkg" >> "$tmpfile"
5959
done

0 commit comments

Comments
 (0)