Skip to content

Commit bba0a1d

Browse files
authored
Merge branch 'master' into affan.khan/v2-checkpoint-as-briefcase
2 parents 92a776a + a562622 commit bba0a1d

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

common/config/azure-pipelines/jobs/version-bump.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,22 @@ jobs:
216216
displayName: rush audit
217217

218218
- ${{ if or(eq(parameters.BumpType, 'minor'), eq(parameters.BumpType, 'patch')) }}:
219+
- bash: |
220+
# Keep this aligned with the version policy used by the release version bump steps below.
221+
versionPolicyName=prerelease-monorepo-lockStep
222+
currentVersion=$(jq -r --arg policyName "$versionPolicyName" '.[] | select(.policyName == $policyName) | .version' common/config/rush/version-policies.json)
223+
if [ -z "$currentVersion" ] || [ "$currentVersion" = "null" ]; then
224+
echo "Failed to find version policy '$versionPolicyName' in common/config/rush/version-policies.json" >&2
225+
exit 1
226+
fi
227+
# Deprecation comments require a released minor/patch version like 5.10.0, not a prerelease suffix like 5.10.0-dev.10.
228+
# For non-prerelease versions, this parameter expansion leaves the version unchanged.
229+
deprecationVersion=${currentVersion%%-*}
230+
sed -i "s/\(addVersion: \"\)[^\"]*/\1$deprecationVersion/" common/config/eslint/eslint.config.deprecation-policy.js
231+
echo "Using deprecation addVersion=$deprecationVersion from version policy $versionPolicyName"
232+
echo "##vso[task.setvariable variable=deprecationVersion]$deprecationVersion"
233+
displayName: Sync deprecation policy addVersion to current version
234+
219235
- bash: node common/scripts/install-run-rush.js lint-deprecation
220236
displayName: rush lint-deprecation
221237

@@ -236,7 +252,7 @@ jobs:
236252
displayName: Determine whether ESLint rule made any changes
237253
238254
- bash: |
239-
git commit -m "Apply deprecation date rule"
255+
git commit -m "Apply deprecation date rule for v$(deprecationVersion)"
240256
displayName: Commit deprecation comment changes to release branch
241257
condition: eq(variables['deprecationCommentChangesMade'], 'true')
242258

0 commit comments

Comments
 (0)