Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/test-auto-generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,18 @@ jobs:
exit 0
fi

# Use changelog_manager.rb but pointed at TEST-CHANGELOG.md
# We need to temporarily swap CHANGELOG.md for the test
# Back up real CHANGELOG, replace with test, run manager, restore
# Use changelog_manager.rb pointed at TEST-CHANGELOG.md
# Pass real version names so changelog_manager validates and runs
# exactly like production. It reads from the real v20111101/package.json
# (not test-v20111101/) — the version number won't match the test config,
# but the workflow mechanics are what we're validating here.
cp CHANGELOG.md CHANGELOG.md.bak
cp TEST-CHANGELOG.md CHANGELOG.md

# *** ISSUE 2 FIX: Pass test directory names to changelog_manager.rb ***
# Instead of "v20111101", pass "test-v20111101" so changelog_manager reads from
# test-v20111101/package.json (version 98.1.0) not v20111101/package.json (version 2.0.0)
TEST_VERSIONS_CSV=$(echo "$GENERATED_VERSIONS" | xargs | sed 's/v20111101/test-v20111101/g' | sed 's/v20250224/test-v20250224/g' | tr ' ' ',')
echo "📋 Updating TEST-CHANGELOG for versions: $TEST_VERSIONS_CSV"
echo "📋 (directory names: converting api versions to test- prefixed directories)"
ruby .github/changelog_manager.rb "$TEST_VERSIONS_CSV"
VERSIONS_CSV=$(echo "$GENERATED_VERSIONS" | xargs | tr ' ' ',')
echo "📋 Updating TEST-CHANGELOG for versions: $VERSIONS_CSV"
ruby .github/changelog_manager.rb "$VERSIONS_CSV"

# Move updated changelog to TEST-CHANGELOG and restore real one
cp CHANGELOG.md TEST-CHANGELOG.md
mv CHANGELOG.md.bak CHANGELOG.md

Expand Down