Skip to content

Commit c476190

Browse files
committed
replace readme with template
1 parent c79e581 commit c476190

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/typespec-python-regenerate.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,23 @@ jobs:
136136
- name: Clean up typespec checkout
137137
run: rm -rf "_typespec"
138138

139+
- name: Apply README template to generated test packages
140+
run: |
141+
set -euo pipefail
142+
TARGET="eng/tools/emitter/gen"
143+
TEMPLATE="$TARGET/template/README.md"
144+
if [ ! -f "$TEMPLATE" ]; then
145+
echo "::error::Template README not found at $TEMPLATE"
146+
exit 1
147+
fi
148+
# Replace every README.md under gen/ with the template, except:
149+
# - the top-level gen/README.md
150+
# - the template itself (gen/template/README.md)
151+
find "$TARGET" -type f -name README.md \
152+
! -path "$TARGET/README.md" \
153+
! -path "$TEMPLATE" \
154+
-print -exec cp -f "$TEMPLATE" {} \;
155+
139156
- name: Commit and push changes
140157
id: push-changes
141158
run: |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ⚠️ TEST CODE — DO NOT INSTALL FROM PYPI
2+
3+
This is not a published Azure SDK package; it exists only for testing purposes. Do not install from PyPI.

0 commit comments

Comments
 (0)