File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ [CmdletBinding ()]
2
+ param (
3
+ [Parameter (Position = 0 )]
4
+ [ValidateNotNullOrEmpty ()]
5
+ [string ] $SdkRepoRootDirectory ,
6
+ [Parameter (Position = 1 )]
7
+ [string ] $TypeSpecProjectDirectory = " ." , # A directory of `tspconfig.yaml` or a remoteUrl of `tspconfig.yaml`
8
+ [Parameter (Position = 2 )]
9
+ [string ] $CommitHash ,
10
+ [Parameter (Position = 3 )]
11
+ [string ] $RepoUrl
12
+ )
13
+
14
+ if ($TypeSpecProjectDirectory -contains " ." ) {
15
+ $TypeSpecProjectDirectory = Resolve-Path $TypeSpecProjectDirectory
16
+ }
17
+
18
+ try {
19
+ Push-Location $SdkRepoRootDirectory
20
+ $commonScript = Join-Path . " eng/common/scripts/TypeSpec-Project-Process.ps1"
21
+ if (Test-Path $commonScript ) {
22
+ . $commonScript - TypeSpecProjectDirectory $TypeSpecProjectDirectory - CommitHash $CommitHash - RepoUrl $RepoUrl
23
+ if ($LASTEXITCODE ) {
24
+ exit $LASTEXITCODE
25
+ }
26
+ }
27
+ else {
28
+ Write-Error " Cannot find $commonScript at $SdkRepoRootDirectory "
29
+ }
30
+ }
31
+ finally {
32
+ Pop-Location
33
+ }
34
+
35
+ exit 0
You can’t perform that action at this time.
0 commit comments