Skip to content

Commit fc7c284

Browse files
Pigbibiclaude
andcommitted
fix: use correct hyphenated package names in update-pin
- ${repo,,} strips hyphens: UsEquityStrategies → usequitystrategies - But constraints.txt uses us-equity-strategies (hyphenated) - Explicit mapping: repo name → package name Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5dab6e7 commit fc7c284

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/update-qpk-pin.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ jobs:
3131
SHA=$(git rev-parse HEAD)
3232
echo "$SHA" > QPK_PIN
3333
34-
# Update SHAs from remote repos
35-
for repo in UsEquityStrategies HkEquityStrategies CnEquityStrategies CryptoStrategies; do
34+
# Update SHAs from remote repos. Package names use hyphenated form.
35+
for pair in "us-equity-strategies:UsEquityStrategies" \
36+
"hk-equity-strategies:HkEquityStrategies" \
37+
"cn-equity-strategies:CnEquityStrategies" \
38+
"crypto-strategies:CryptoStrategies"; do
39+
pkg="${pair%%:*}"
40+
repo="${pair##*:}"
3641
RSHA=$(git ls-remote "https://github.com/QuantStrategyLab/$repo.git" HEAD | cut -f1)
37-
[ -n "$RSHA" ] && sed -i "s|${repo,,} @ git+https://github.com/QuantStrategyLab/$repo.git@[a-f0-9]*|${repo,,} @ git+https://github.com/QuantStrategyLab/$repo.git@$RSHA|" constraints.txt || true
42+
[ -n "$RSHA" ] && sed -i "s|$pkg @ git+https://github.com/QuantStrategyLab/$repo.git@[a-f0-9]*|$pkg @ git+https://github.com/QuantStrategyLab/$repo.git@$RSHA|" constraints.txt || true
3843
done
3944
sed -i "s|quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@[a-f0-9]*|quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@$SHA|" constraints.txt
4045

0 commit comments

Comments
 (0)