diff --git a/.scripts/automation_generate.sh b/.scripts/automation_generate.sh new file mode 100644 index 000000000000..bc722cdd19fd --- /dev/null +++ b/.scripts/automation_generate.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +track2-codegen-automation-for-pipeline --inputJsonPath=$1 --outputJsonPath=$2 --use=@autorest/typescript@6.0.0-beta.5 diff --git a/.scripts/automation_init.sh b/.scripts/automation_init.sh new file mode 100644 index 000000000000..313a0e3132dd --- /dev/null +++ b/.scripts/automation_init.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# rush install +npm install -g @microsoft/rush +rush install +# install release tools +npm install -g azure-track2-js-sdk-release-tools diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index a5dbf1c2011a..159192b300ea 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -1,18 +1,22 @@ { - "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json", - "meta": { - "autorest_options": { - "version": "V2", - "typescript": "", - "license-header": "MICROSOFT_MIT_NO_VERSION", - "sdkrel:typescript-sdks-folder": ".", - "use": "@microsoft.azure/autorest.typescript@4.7.0" + "advancedOptions": { + "createSdkPullRequests": true, + "generationCallMode": "one-per-config" + }, + "initOptions": { + "initScript": { + "path": "sh .scripts/automation_init.sh" + } + }, + "generateOptions": { + "generateScript": { + "path": "sh .scripts/automation_generate.sh", + "stderr": { + "showInComment": "^\\[AUTOREST\\]", + "scriptError": "^\\[ERROR\\]", + "scriptWarning": "^\\[WARNING\\]" + } }, - "advanced_options": { - "clone_dir": "./azure-sdk-for-js", - "create_sdk_pull_requests": true, - "sdk_generation_pull_request_base": "integration_branch" - }, - "version": "0.2.0" + "parseGenerateOutput": true } }