Skip to content

Commit

Permalink
Modifying generate.ps1 to use the Start-AutoRestGeneration cmdlet (#…
Browse files Browse the repository at this point in the history
…4420)

* Modifying generate.ps1 to use the Start-AutoRestGeneration cmdlet

* Delete generate.cmds

* retaining legacy custom scripts
  • Loading branch information
dsgouda authored and shahabhijeet committed Jun 11, 2018
1 parent 1008417 commit 02dd89f
Show file tree
Hide file tree
Showing 45 changed files with 46 additions and 244 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
powershell.exe -ExecutionPolicy Bypass `
-NoLogo `
-NonInteractive `
-NoProfile `
-File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" `
-ResourceProvider "azsadmin/resource-manager/azurebridge" `
-PowershellInvoker `
-AutoRestVersion "latest" `
-SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/azurebridge" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
10 changes: 0 additions & 10 deletions src/AzureStack/Admin/CommerceAdmin/Commerce.Admin/generate.cmd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/commerce" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/commerce" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
10 changes: 0 additions & 10 deletions src/AzureStack/Admin/ComputeAdmin/Compute.Admin/generate.cmd

This file was deleted.

14 changes: 1 addition & 13 deletions src/AzureStack/Admin/ComputeAdmin/Compute.Admin/generate.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
# Remove Old
Remove-Item "$PSScriptRoot\Generated" -Force -Recurse -ErrorAction SilentlyContinue

# Generate new
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/compute" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot

# Move
$From = "$PSScriptRoot\Compute\Compute.Admin\Generated"
$To = "$PSScriptRoot\Generated"
Move-Item -Path $From -Destination $To -Force

# Cleanup
Remove-Item "$PSScriptRoot\Compute" -Force -Recurse
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/compute" -AutoRestVersion "latest" -SdkRootDirectory "$PSScriptRoot"
13 changes: 13 additions & 0 deletions src/AzureStack/Admin/ComputeAdmin/Compute.Admin/legacygenerate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Remove Old
Remove-Item "$PSScriptRoot\Generated" -Force -Recurse -ErrorAction SilentlyContinue

# Generate new
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/compute" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot

# Move
$From = "$PSScriptRoot\Compute\Compute.Admin\Generated"
$To = "$PSScriptRoot\Generated"
Move-Item -Path $From -Destination $To -Force

# Cleanup
Remove-Item "$PSScriptRoot\Compute" -Force -Recurse
7 changes: 0 additions & 7 deletions src/AzureStack/Admin/FabricAdmin/Fabric.Admin/generate.cmd

This file was deleted.

2 changes: 1 addition & 1 deletion src/AzureStack/Admin/FabricAdmin/Fabric.Admin/generate.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/fabric" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/fabric" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
7 changes: 0 additions & 7 deletions src/AzureStack/Admin/GalleryAdmin/Gallery.Admin/generate.cmd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/gallery" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/gallery" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/infrastructureinsights" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/infrastructureinsights" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
10 changes: 0 additions & 10 deletions src/AzureStack/Admin/KeyVaultAdmin/KeyVault.Admin/generate.cmd

This file was deleted.

12 changes: 1 addition & 11 deletions src/AzureStack/Admin/KeyVaultAdmin/KeyVault.Admin/generate.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
# Remove old
Remove-Item -Path "$PSScriptRoot\Generated" -Force -Recurse

# Generate
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/keyvault" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot

# Cleanup
$From = Join-Path -Path $PSScriptRoot -ChildPath "KeyVault\KeyVault.Admin\Generated"
$To = $PSScriptRoot
Move-Item -Path $From -Destination $To -Force
Remove-Item -Path "$PSScriptRoot\Commerce" -Recurse -Force
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/keyvault" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Remove old
Remove-Item -Path "$PSScriptRoot\Generated" -Force -Recurse

# Generate
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/keyvault" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot

# Cleanup
$From = Join-Path -Path $PSScriptRoot -ChildPath "KeyVault\KeyVault.Admin\Generated"
$To = $PSScriptRoot
Move-Item -Path $From -Destination $To -Force
Remove-Item -Path "$PSScriptRoot\Commerce" -Recurse -Force
7 changes: 0 additions & 7 deletions src/AzureStack/Admin/NetworkAdmin/Network.Admin/generate.cmd

This file was deleted.

10 changes: 1 addition & 9 deletions src/AzureStack/Admin/NetworkAdmin/Network.Admin/generate.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
powershell.exe -ExecutionPolicy Bypass `
-NoLogo `
-NonInteractive `
-NoProfile `
-File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" `
-ResourceProvider "azsadmin/resource-manager/network" `
-PowershellInvoker `
-AutoRestVersion "latest" `
-SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/network" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
6 changes: 0 additions & 6 deletions src/AzureStack/Admin/StorageAdmin/Storage.Admin/generate.cmd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/storage" -PowershellInvoker -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/storage" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# Generate new
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/subscriptions" -PowershellInvoker -AutoRestVersion "latest" -SdkDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/subscriptions" -AutoRestVersion "latest" -SdkDirectory $PSScriptRoot
8 changes: 0 additions & 8 deletions src/AzureStack/Admin/UpdateAdmin/Update.Admin/generate.cmd

This file was deleted.

11 changes: 1 addition & 10 deletions src/AzureStack/Admin/UpdateAdmin/Update.Admin/generate.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
powershell.exe `
-ExecutionPolicy Bypass `
-NoLogo `
-NonInteractive `
-NoProfile `
-File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" `
-ResourceProvider "azsadmin/resource-manager/update" `
-PowershellInvoker `
-AutoRestVersion "latest" `
-SdkRootDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/update" -AutoRestVersion "latest" -SdkRootDirectory $PSScriptRoot

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "azsadmin/resource-manager/user-subscriptions" -PowershellInvoker -AutoRestVersion "latest" -SdkDirectory $PSScriptRoot
Start-AutoRestCodeGeneration -ResourceProvider "azsadmin/resource-manager/user-subscriptions" -AutoRestVersion "latest" -SdkDirectory $PSScriptRoot
7 changes: 0 additions & 7 deletions src/SDKs/BotService/Management.BotService/generate.cmd

This file was deleted.

2 changes: 1 addition & 1 deletion src/SDKs/BotService/Management.BotService/generate.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "botservice/resource-manager" -PowershellInvoker -AutoRestVersion "latest"
Start-AutoRestCodeGeneration -ResourceProvider "botservice/resource-manager" -AutoRestVersion "latest" -SdkGenerationDirectory "$PSScriptRoot\Generated"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<#
This is a template to describe how to call the generateTool.ps1 script to generate the code using AutoRest
#>
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/TextAnalytics" -PowershellInvoker
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/TextAnalytics" -AutoRestVersion "latest" -SdkGenerationDirectory "$PSScriptRoot\Generated\TextAnalytics"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices\data-plane\SpellCheck" -PowershellInvoker -AutoRestVersion "latest"
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices\data-plane\SpellCheck" -AutoRestVersion "latest"

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<#
This is a template to describe how to call the generateTool.ps1 script to generate the code using AutoRest
#>
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/TextAnalytics" -PowershellInvoker
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/TextAnalytics" -AutoRestVersion "latest" -SdkGenerationDirectory "$PSScriptRoot\Generated\TextAnalytics"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<#
This is a template to describe how to call the generateTool.ps1 script to generate the code using AutoRest
#>
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/CustomImageSearch" -PowershellInvoker
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/CustomImageSearch" -AutoRestVersion "latest"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<#
This is a template to describe how to call the generateTool.ps1 script to generate the code using AutoRest
#>
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/VisualSearch" -PowershellInvoker
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/VisualSearch" -AutoRestVersion "latest" -SdkGenerationDirectory "$PSScriptRoot\Generated"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<#
This is a template to describe how to call the generateTool.ps1 script to generate the code using AutoRest
#>
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/ContentModerator" -PowershellInvoker
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/ContentModerator" -AutoRestVersion "latest"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/CustomVision/Prediction" -PowershellInvoker -AutoRestVersion "latest"
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/CustomVision/Prediction" -AutoRestVersion "latest"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/CustomVision/Training" -PowershellInvoker -AutoRestVersion "latest"
Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/CustomVision/Training" -AutoRestVersion "latest"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "trafficmanager/resource-manager" -PowershellInvoker -AutoRestVersion "latest"
Start-AutoRestCodeGeneration -ResourceProvider "trafficmanager/resource-manager" -AutoRestVersion "latest"

0 comments on commit 02dd89f

Please sign in to comment.