[FR] Reset deprecated lock to the latest state during lock (#5827)

This commit is contained in:
Mika Ayenson, PhD
2026-03-16 17:04:56 -05:00
committed by GitHub
parent d74c83140b
commit 49c9c283e6
2 changed files with 14 additions and 3 deletions
+13 -2
View File
@@ -4,13 +4,24 @@ set -e
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# switch to
for BRANCH in $(echo $@ | sed "s/,/ /g")
BRANCHES=($(echo "$@" | sed "s/,/ /g" | tr ' ' '\n' | sort -V))
LAST_INDEX=$((${#BRANCHES[@]} - 1))
for i in "${!BRANCHES[@]}"
do
BRANCH=${BRANCHES[$i]}
echo $BRANCH
git checkout $BRANCH
git pull
python -m detection_rules dev build-release --update-version-lock
# Reset deprecated_rules.json after all branches except the last to prevent
# branch-specific deprecations from leaking across checkouts (e.g. D4C rules
# deprecated on 8.19 but active on 9.3+). The last branch is closest to main
# and carries the correct deprecation state forward.
if [ $i -lt $LAST_INDEX ]; then
git checkout -- detection_rules/etc/deprecated_rules.json
fi
done
git checkout ${CURRENT_BRANCH}
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "detection_rules"
version = "1.6.1"
version = "1.6.2"
description = "Detection Rules is the home for rules used by Elastic Security. This repository is used for the development, maintenance, testing, validation, and release of rules for Elastic Securitys Detection Engine."
readme = "README.md"
requires-python = ">=3.12"