From 961cc3df39164e45fa00c2eba927dd4316e9440a Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 6 Nov 2024 23:42:31 -0600 Subject: [PATCH] Ensure that semver files are sorted as part of CI (backport ) (cherry picked from commit accd3b29203621c3328ac50e850135bd4d034dcc) --- ci/style.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 ci/style.sh diff --git a/ci/style.sh b/ci/style.sh old mode 100644 new mode 100755 index 923e675b86d32..7b4508a6524ff --- a/ci/style.sh +++ b/ci/style.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh set -ex @@ -18,3 +18,13 @@ else exit 1 fi +for file in libc-test/semver/*.txt; do + case "$file" in + *TODO*) continue ;; + esac + + if ! sort -C "$file"; then + echo "Unsorted semver file $file" + exit 1 + fi +done