Skip to content

Commit 0df2a11

Browse files
authored
Standardize constantPaths for updating package version in automated PRs (Azure#15685)
1 parent b4e906c commit 0df2a11

File tree

31 files changed

+154
-7
lines changed

31 files changed

+154
-7
lines changed

sdk/communication/communication-chat/package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"types": "types/communication-chat.d.ts",
99
"scripts": {
1010
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
11-
"build:autorest": "autorest ./swagger/README.md --typescript --version=3.0.6267 --v3 --package-version=1.1.0-beta.1 && rushx format",
11+
"build:autorest": "autorest ./swagger/README.md --typescript --version=3.0.6267 --v3 && rushx format",
1212
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
1313
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
1414
"build:samples": "echo Obsolete.",
@@ -124,6 +124,22 @@
124124
"util": "^0.12.1",
125125
"typedoc": "0.15.2"
126126
},
127+
"//metadata": {
128+
"constantPaths": [
129+
{
130+
"path": "src/generated/src/chatApiClientContext.ts",
131+
"prefix": "packageVersion"
132+
},
133+
{
134+
"path": "src/constants.ts",
135+
"prefix": "SDK_VERSION"
136+
},
137+
{
138+
"path": "swagger/README.md",
139+
"prefix": "package-version"
140+
}
141+
]
142+
},
127143
"//sampleConfiguration": {
128144
"productName": "Azure Communication Services - Chat",
129145
"productSlugs": [

sdk/communication/communication-chat/swagger/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use-extension:
2121
azure-arm: false
2222
add-credentials: false
2323
disable-async-iterators: true
24+
package-version: 1.1.0-beta.1
2425
```
2526
2627
### Rename CommunicationError to ChatError

sdk/communication/communication-sms/package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"types": "types/communication-sms.d.ts",
1313
"scripts": {
1414
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
15-
"build:autorest": "autorest ./swagger/README.md --typescript --v3 --package-version=1.0.1 && rushx format",
15+
"build:autorest": "autorest ./swagger/README.md --typescript --v3 && rushx format",
1616
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
1717
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
1818
"build:samples": "dev-tool samples publish --force",
@@ -122,6 +122,22 @@
122122
"util": "^0.12.1",
123123
"typedoc": "0.15.2"
124124
},
125+
"//metadata": {
126+
"constantPaths": [
127+
{
128+
"path": "src/generated/src/smsApiClientContext.ts",
129+
"prefix": "packageVersion"
130+
},
131+
{
132+
"path": "src/constants.ts",
133+
"prefix": "SDK_VERSION"
134+
},
135+
{
136+
"path": "swagger/README.md",
137+
"prefix": "package-version"
138+
}
139+
]
140+
},
125141
"//sampleConfiguration": {
126142
"productName": "Azure Communication Services - SMS",
127143
"productSlugs": [

sdk/communication/communication-sms/swagger/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ use-extension:
1919
"@autorest/typescript": "6.0.0-dev.20200623.2"
2020
azure-arm: false
2121
add-credentials: false
22+
package-version: 1.0.1
2223
```

sdk/containerregistry/container-registry/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
{
2020
"path": "src/constants.ts",
2121
"prefix": "SDK_VERSION"
22+
},
23+
{
24+
"path": "swagger/README.md",
25+
"prefix": "package-version"
2226
}
2327
]
2428
},

sdk/containerregistry/container-registry/swagger/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ hide-clients: true
2222
use-core-v2: true
2323
use-extension:
2424
"@autorest/typescript": "C:/github/autorest.typescript"
25+
package-version: 1.0.0-beta.4
2526
```

sdk/digitaltwins/digital-twins-core/package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,22 @@
123123
"@types/uuid": "^8.0.0"
124124
},
125125
"sideEffects": false,
126+
"//metadata": {
127+
"constantPaths": [
128+
{
129+
"path": "src/generated/azureDigitalTwinsAPIContext.ts",
130+
"prefix": "packageVersion"
131+
},
132+
{
133+
"path": "src/digitalTwinsClient.ts",
134+
"prefix": "SDK_VERSION"
135+
},
136+
{
137+
"path": "swagger/README.md",
138+
"prefix": "package-version"
139+
}
140+
]
141+
},
126142
"//sampleConfiguration": {
127143
"productName": "Azure Digital Twins",
128144
"productSlugs": [

sdk/digitaltwins/digital-twins-core/swagger/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ license-header: MICROSOFT_MIT_NO_VERSION
1515
input-file: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json
1616
output-folder: ../
1717
source-code-folder-path: ./src/generated
18+
package-version: 1.0.4
1819
```
1920
2021
## Customizations for Track 2 Generator

sdk/keyvault/keyvault-admin/package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@
7171
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
7272
"docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src"
7373
},
74+
"//metadata": {
75+
"constantPaths": [
76+
{
77+
"path": "src/generated/keyVaultClientContext.ts",
78+
"prefix": "packageVersion"
79+
},
80+
{
81+
"path": "src/constants.ts",
82+
"prefix": "SDK_VERSION"
83+
},
84+
{
85+
"path": "swagger/README.md",
86+
"prefix": "package-version"
87+
}
88+
]
89+
},
7490
"//sampleConfiguration": {
7591
"productName": "Azure Key Vault Administration",
7692
"productSlugs": [

sdk/keyvault/keyvault-admin/swagger/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ input-file:
1717
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/1e2c9f3ec93078da8078389941531359e274f32a/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.2/backuprestore.json
1818
output-folder: ../
1919
source-code-folder-path: ./src/generated
20+
package-version: 4.0.0-beta.4
2021
```
2122
2223
### Hide LROs

0 commit comments

Comments
 (0)