Skip to content

Commit f99976e

Browse files
committed
Improve ci script
1 parent bcc7ea8 commit f99976e

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

submit_ci.sh

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,14 @@ fi
2323
BASE_COMMIT="$1"
2424
TIP_COMMIT="$2"
2525

26-
# Fix commits to apply (hardcoded for now)
27-
# 780b05710047: rust_binder: Fix build failure if !CONFIG_COMPAT
28-
# c658b7542cb9: rust: bitops: fix missing _find_* functions on 32-bit ARM
29-
FIXES="780b05710047 c658b7542cb9"
30-
3126
# Prepare Fixes Branch
32-
echo "Preparing fixes branch based on $BASE_COMMIT..."
27+
echo "Checking for local fixes branch..."
3328
(
3429
cd linux
35-
# Create/Reset ci/base-fixes branch
36-
git checkout -B ci/base-fixes "$BASE_COMMIT" > /dev/null 2>&1
37-
for FIX in $FIXES; do
38-
git cherry-pick "$FIX" > /dev/null
39-
done
30+
if ! git rev-parse --verify ci/base-fixes >/dev/null 2>&1; then
31+
echo "Error: local branch 'ci/base-fixes' not found in linux submodule."
32+
exit 1
33+
fi
4034
)
4135

4236
# Get list of commits to test (oldest to newest)
@@ -52,8 +46,9 @@ echo "Found $(echo "$COMMITS" | wc -l) commits to test."
5246

5347
for COMMIT in $COMMITS; do
5448
SHORT_COMMIT=$(echo "$COMMIT" | cut -c1-12)
49+
COMMIT_SUBJECT=$(cd linux && git show -s --format=%s "$COMMIT")
5550
echo "========================================"
56-
echo "Processing submodule commit $SHORT_COMMIT"
51+
echo "Processing submodule commit $SHORT_COMMIT: $COMMIT_SUBJECT"
5752
echo "========================================"
5853

5954
# 1. Prepare Submodule
@@ -71,8 +66,9 @@ for COMMIT in $COMMITS; do
7166
echo "Updating parent repository..."
7267
git add linux
7368
# Amend the previous commit to avoid creating a huge history in the parent if running repeatedly?
74-
# But we want to test each one.
75-
git commit -m "ci: Update submodule to $SHORT_COMMIT (testing)"
69+
# The user said "final history in the parent repository... is linear".
70+
# If we just keep making new commits, we get a linear history.
71+
git commit -m "$SHORT_COMMIT: $COMMIT_SUBJECT"
7672

7773
# 3. Push Parent
7874
echo "Pushing to CI..."
@@ -88,4 +84,4 @@ for COMMIT in $COMMITS; do
8884
fi
8985
done
9086

91-
echo "Done!"
87+
echo "Done!"

0 commit comments

Comments
 (0)