summaryrefslogtreecommitdiff
path: root/scripts/submodule_set_release.sh
blob: c48a6b93719958dd63a6e9b7b16e824c20c22004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Eclipse ThreadX Contributors
# Some portions generated by Copilot (claude-sonnet-4.6).
#
# Update test submodules to the latest commit on their release branch (master).
# Run this on release day after dev has been merged to master.

set -euo pipefail

REPO_ROOT="$(dirname "$(realpath "$0")")/.."
SUBMODULES=(
    "test/cmake/filex"
    "test/cmake/threadx"
)
RELEASE_BRANCH="master"

cd "$REPO_ROOT"

for sub in "${SUBMODULES[@]}"; do
    echo "Updating $sub to origin/$RELEASE_BRANCH..."
    git -C "$sub" fetch origin "$RELEASE_BRANCH"
    git -C "$sub" checkout "origin/$RELEASE_BRANCH"
done

git add "${SUBMODULES[@]}"
echo ""
echo "Submodules updated. Review with 'git diff --cached', then commit:"
echo "  git commit -m \"chore: update submodules to latest release commits\""