Skip to content

Commit 3d2166a

Browse files
committed
[LTR]: Support both versioned and generic spec files
Handle transition phase where some kernels use ciq/SPECS/kernel-clkX.YY and others use ciq/SPECS/kernel.spec. Prioritize versioned spec file based on detected kernel version, with fallback to generic spec file.
1 parent 3049698 commit 3d2166a

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

lt_rebase.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,22 @@ if [ ! -z "$REPO_STATUS" ]; then
148148
git commit -m "[CIQ] $(git describe --tags --abbrev=0) - rebased configs"
149149
fi
150150

151-
SPEC_FILE="./ciq/SPECS/kernel.spec"
152-
if [ -f "$SPEC_FILE" ] ; then
153-
echo "Updating kernel.spec version variables and changelog..."
151+
# Check for versioned spec file first, then fall back to kernel.spec
152+
VERSIONED_SPEC_FILE="./ciq/SPECS/kernel-clk${KERNEL_VERSION}.spec"
153+
GENERIC_SPEC_FILE="./ciq/SPECS/kernel.spec"
154+
155+
if [ -f "$VERSIONED_SPEC_FILE" ]; then
156+
SPEC_FILE="$VERSIONED_SPEC_FILE"
157+
echo "Found versioned spec file: $SPEC_FILE"
158+
elif [ -f "$GENERIC_SPEC_FILE" ]; then
159+
SPEC_FILE="$GENERIC_SPEC_FILE"
160+
echo "Found spec file: $SPEC_FILE"
161+
else
162+
SPEC_FILE=""
163+
fi
164+
165+
if [ -n "$SPEC_FILE" ]; then
166+
echo "Updating spec file version variables and changelog..."
154167

155168
# Set default values for DISTLOCALVERSION and DIST if not set
156169
DISTLOCALVERSION=${DISTLOCALVERSION:-".1.0.0"}

0 commit comments

Comments
 (0)