Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate Cognitive Search Code Generation in CI #33961

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/scripts/Invoke-Codegeneration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ try {
Push-Location $Directory
if ($AutorestOptions) {
Write-Host "Running 'autorest $AutorestOptions' in directory '$Directory'."
& "autorest $AutorestOptions"
Invoke-Expression "autorest $AutorestOptions"
} else {
Write-Host "Running 'autorest' in directory '$Directory'."
& autorest
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=package-2021-04-30-Preview-searchindex'
& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=package-2021-04-30-Preview-searchservice'
Comment on lines +1 to +2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=package-2021-04-30-Preview-searchindex'
& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=package-2021-04-30-Preview-searchservice'
$gitRoot = git rev-parse --show-toplevel
& (Join-Path $PSScriptRoot $gitRoot eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=package-2021-04-30-Preview-searchindex'
& (Join-Path $PSScriptRoot $gitRoot eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=package-2021-04-30-Preview-searchservice'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to save this change for a later date, mainly due to the need to know what git rev-parse --show-toplevel does compared to direct path hierarchy traversal (..)