Skip to content

Commit

Permalink
Use dotnet build to generate code (Azure#15573)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym authored Sep 30, 2020
1 parent b20c241 commit 43cee6a
Show file tree
Hide file tree
Showing 37 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ input-file:
require: https://github.com/Azure/azure-rest-api-specs/blob/49fc16354df7211f8392c56884a3437138317d1f/specification/azsadmin/resource-manager/storage/readme.md
```
3. Run `dotnet msbuild /t:GenerateCode` in src directory of the project (e.g. `net\sdk\storage\Azure.Management.Storage\src`). This would run AutoRest and generate the code. (NOTE: this step requires Node 13).
3. Run `dotnet build /t:GenerateCode` in src directory of the project (e.g. `net\sdk\storage\Azure.Management.Storage\src`). This would run AutoRest and generate the code. (NOTE: this step requires Node 13).
4. For management plan libraries add `azure-arm: true` setting to `autorest.md` client constructors and options would be auto-generated. For data-plane libraries follow the next two steps.
4. Add a `*ClientOptions` type that inherits from `ClientOptions` and has a service version enum:

Expand Down
2 changes: 1 addition & 1 deletion eng/CodeGeneration.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AutoRestInput Condition="'$(AutoRestInput)' == ''">$(_DefaultInputName)</AutoRestInput>
<!--
Allows passing additional AutoRest command line arguments, for example to run in interactive mode
use the following command line (remove the space between minus minus): dotnet msbuild /t:GenerateCode /p:AutoRestAdditionalParameters="- -interactive"
use the following command line (remove the space between minus minus): dotnet build /t:GenerateCode /p:AutoRestAdditionalParameters="- -interactive"
-->
<AutoRestAdditionalParameters></AutoRestAdditionalParameters>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
input-file:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
2 changes: 1 addition & 1 deletion sdk/compute/Azure.ResourceManager.Compute/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml

Expand Down
2 changes: 1 addition & 1 deletion sdk/digitaltwins/Azure.DigitalTwins.Core/src/generate.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dotnet msbuild /t:GenerateCode
dotnet build /t:GenerateCode
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dotnet msbuild /t:GenerateCode
dotnet build /t:GenerateCode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml

Expand Down
2 changes: 1 addition & 1 deletion sdk/dns/Azure.ResourceManager.Dns/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml

Expand Down
2 changes: 1 addition & 1 deletion sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
directive:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
2 changes: 1 addition & 1 deletion sdk/formrecognizer/Azure.AI.FormRecognizer/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure.AI.FormRecognizer

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

### AutoRest Configuration
> see https://aka.ms/autorest
Expand Down
2 changes: 1 addition & 1 deletion sdk/iot/Azure.Iot.Hub.Service/src/generateCode.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dotnet msbuild /t:GenerateCode
dotnet build /t:GenerateCode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ description: Samples for the Azure.Security.KeyVault.Administration client libra
- Creating, getting, and deleting role assignments [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md)
- [Assigning roles for specific scopes](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md)
- Performing a full key backup and restore [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md) and [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md)
- [Checking the status of a previously started backup or restore](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample3_BackRestoreResume.md)
- [Performing selective key restore]
- [Performing selective key restore](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_SelectiveRestore.md)
- [Checking the status of a previously started backup or restore](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample3_BackRestoreResume.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Performing a full key restore
# Performing a selective key restore

Using the `KeyVaultBackupClient`, you can restore a single key from backup by key name. The data source for a
selective key restore is a storage blob accessed using Shared Access Signature authentication.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### AutoRest Configuration
> see https://aka.ms/autorest
Run `dotnet msbuild /t:GenerateCode` in src directory to re-generate.
Run `dotnet build /t:GenerateCode` in src directory to re-generate.

``` yaml
title: Azure.Security.KeyVault.Administration
Expand Down
2 changes: 1 addition & 1 deletion sdk/keyvault/samples/sharelink/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

> see https://aka.ms/autorest
Run `dotnet msbuild /t:GenerateCode /p:IsClientLibrary=true` in src directory to re-generate.
Run `dotnet build /t:GenerateCode /p:IsClientLibrary=true` in src directory to re-generate.

``` yaml
title: Azure.Security.KeyVault.Storage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
input-file:
Expand Down
2 changes: 1 addition & 1 deletion sdk/network/Azure.ResourceManager.Network/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.
#TODO: update commit id back to e25881196fcf84fca4dfaedc9fc45a00db4e0541 (?) after merging /azure-rest-api-specs/pull/9800

``` yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
input-file: schemaregistry.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/Azure.ResourceManager.Storage/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microsoft.Azure.Synapse

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

### AutoRest Configuration
> see https://aka.ms/autorest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microsoft.Azure.Synapse

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

### AutoRest Configuration
> see https://aka.ms/autorest
Expand Down
2 changes: 1 addition & 1 deletion sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microsoft.Azure.Synapse

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

### AutoRest Configuration
> see https://aka.ms/autorest
Expand Down
2 changes: 1 addition & 1 deletion sdk/tables/Azure.Data.Tables/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### AutoRest Configuration
> see https://aka.ms/autorest
Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
title: Azure.Data.Tables
Expand Down
2 changes: 1 addition & 1 deletion sdk/template/Azure.Template/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
input-file:
Expand Down
2 changes: 1 addition & 1 deletion sdk/testcommon/Azure.Graph.Rbac/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated code configuration

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
Expand Down
2 changes: 1 addition & 1 deletion sdk/textanalytics/Azure.AI.TextAnalytics/src/autorest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure.AI.TextAnalytics

Run `dotnet msbuild /t:GenerateCode` to generate code.
Run `dotnet build /t:GenerateCode` to generate code.

### AutoRest Configuration
> see https://aka.ms/autorest
Expand Down

0 comments on commit 43cee6a

Please sign in to comment.