Skip to content

Commit 801ff45

Browse files
connor4312Copilot
andauthored
ci(kotlin): narrow ADO verify check to generated/ to avoid NOTICE.txt drift (#175)
The ESRP-backed maven-package template drops files like NOTICE.txt into clients/kotlin during the publish flow. The previous broad `git status --porcelain -- clients/kotlin` check would catch these as untracked files (`?? clients/kotlin/NOTICE.txt`) and fail the build with a misleading 'Generated Kotlin sources are out of date' error. Narrow the check to the generated/ subdirectory, where `npm run generate:kotlin` actually writes its output. Matches the same fix applied to clients/typescript/pipeline.yml in #174. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ff52964 commit 801ff45

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

clients/kotlin/pipeline.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,16 @@ extends:
107107

108108
- bash: |
109109
set -euo pipefail
110-
if [ -n "$(git status --porcelain -- clients/kotlin)" ]; then
110+
# Narrow path filter: only the generated/ subdir, not all of
111+
# clients/kotlin. The ADO maven-package template drops files
112+
# like NOTICE.txt into clients/kotlin during the publish step,
113+
# which a broad check would mistake for stale generated source
114+
# drift. Matches the GHA ci.yml pattern.
115+
GENERATED_DIR=clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated
116+
if [ -n "$(git status --porcelain -- $GENERATED_DIR)" ]; then
111117
echo "##vso[task.logissue type=error]Generated Kotlin sources are out of date. Run 'npm run generate:kotlin' and commit the result."
112-
git status --porcelain -- clients/kotlin
113-
git --no-pager diff -- clients/kotlin
118+
git status --porcelain -- $GENERATED_DIR
119+
git --no-pager diff -- $GENERATED_DIR
114120
exit 1
115121
fi
116122
displayName: ✅ Verify generated Kotlin is up to date

0 commit comments

Comments
 (0)