From 073b2f7724e5c7515e1c5205ba729020bdde5182 Mon Sep 17 00:00:00 2001 From: abhishekkumams <102276754+abhishekkumams@users.noreply.github.com> Date: Sun, 13 Nov 2022 10:47:08 +0530 Subject: [PATCH 01/14] Update create_manifest_file.ps1 fix single object array to object conversion --- create_manifest_file.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 4d20d1d481..7e72a7407a 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -80,5 +80,5 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -$versionArray | ConvertTo-Json -Depth 4 | Out-File $BuildOutputDir/dab-manifest.json +ConvertTo-Json $versionArray -Depth 4 | Out-File $BuildOutputDir/dab-manifest.json From ca200a5fec5445d77ee026fe28b0dd4a961fa582 Mon Sep 17 00:00:00 2001 From: abhishekkumams <102276754+abhishekkumams@users.noreply.github.com> Date: Sun, 13 Nov 2022 18:45:52 +0530 Subject: [PATCH 02/14] Update create_manifest_file.ps1 --- create_manifest_file.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 7e72a7407a..bc4d961aae 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -80,5 +80,5 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -ConvertTo-Json $versionArray -Depth 4 | Out-File $BuildOutputDir/dab-manifest.json +ConvertTo-Json -Depth 4 $versionArray | Out-File $BuildOutputDir/dab-manifest.json From b250b66734f3ba12088472b28f38086442080684 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Sun, 13 Nov 2022 19:02:41 +0530 Subject: [PATCH 03/14] enabling pwsh --- .pipelines/build-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pipelines/build-pipelines.yml b/.pipelines/build-pipelines.yml index 59b2e4ad2f..072fbb4836 100644 --- a/.pipelines/build-pipelines.yml +++ b/.pipelines/build-pipelines.yml @@ -148,6 +148,7 @@ steps: displayName: "Generate Manifest File" inputs: targetType: 'filePath' + pwsh: true filePath: $(System.DefaultWorkingDirectory)/create_manifest_file.ps1 arguments: $(buildConfiguration) $(Build.ArtifactStagingDirectory) $(dabVersion) $(isReleaseBuild) From 1fc1d4eabbce47c822a2ba8d2e47c1d7dc3e8006 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 24 Nov 2022 10:00:47 +0530 Subject: [PATCH 04/14] testing changes --- create_manifest_file.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index bc4d961aae..1f1f1923a9 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -80,5 +80,5 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -ConvertTo-Json -Depth 4 $versionArray | Out-File $BuildOutputDir/dab-manifest.json +@(ConvertTo-Json -Depth 4 $versionArray) | Out-File $BuildOutputDir/dab-manifest.json From 2afe327844ffb7c63e77d485df31e400eea17377 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 09:29:41 +0530 Subject: [PATCH 05/14] testing --- create_manifest_file.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 1f1f1923a9..66127817bb 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -80,5 +80,7 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -@(ConvertTo-Json -Depth 4 $versionArray) | Out-File $BuildOutputDir/dab-manifest.json +$jsonX = @(ConvertTo-Json -Depth 4 $versionArray) +$jsonX +$jsonX | Out-File $BuildOutputDir/dab-manifest.json From 7da5e76481c6e0f4ae4930a87f283509f8f7ccda Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 09:41:43 +0530 Subject: [PATCH 06/14] testing --- .pipelines/build-pipelines.yml | 1 - create_manifest_file.ps1 | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pipelines/build-pipelines.yml b/.pipelines/build-pipelines.yml index 19422f3c77..f80fd50503 100644 --- a/.pipelines/build-pipelines.yml +++ b/.pipelines/build-pipelines.yml @@ -148,7 +148,6 @@ steps: displayName: "Generate Manifest File" inputs: targetType: 'filePath' - pwsh: true filePath: $(System.DefaultWorkingDirectory)/create_manifest_file.ps1 arguments: $(buildConfiguration) $(Build.ArtifactStagingDirectory) $(dabVersion) $(isReleaseBuild) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 66127817bb..6de523eded 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -72,6 +72,8 @@ $latestBlock = $ExecutionContext.InvokeCommand.ExpandString($latestBlock) | Conv $versionArray = '[]' | ConvertFrom-Json $versionArray += $latestBlock +$versionArray + # Removing the oldest version if total count exceeds the max permissible count if($versionArray.Length -gt $maxVersionCount){ $versionArray = [System.Collections.ArrayList]$versionArray From 18c02e6c509d622d18abb2d8f59c2d9069da060b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 09:58:37 +0530 Subject: [PATCH 07/14] testing --- create_manifest_file.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 6de523eded..3394af6520 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -72,7 +72,7 @@ $latestBlock = $ExecutionContext.InvokeCommand.ExpandString($latestBlock) | Conv $versionArray = '[]' | ConvertFrom-Json $versionArray += $latestBlock -$versionArray +Write-Host("versionArray: = {$versionArray}") # Removing the oldest version if total count exceeds the max permissible count if($versionArray.Length -gt $maxVersionCount){ @@ -83,6 +83,6 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. $jsonX = @(ConvertTo-Json -Depth 4 $versionArray) -$jsonX +Write-Host("JsonArray: = {$jsonX}") $jsonX | Out-File $BuildOutputDir/dab-manifest.json From ef7dec59cf62f4346a937cd47bb0b2f053bd086f Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 10:11:29 +0530 Subject: [PATCH 08/14] testing --- create_manifest_file.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 3394af6520..df01973dfd 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -69,10 +69,10 @@ $latestBlock = $ExecutionContext.InvokeCommand.ExpandString($latestBlock) | Conv # Adding new block to the top of the list of released versions. # TODO: To use the data from the current manifest file and update it. -$versionArray = '[]' | ConvertFrom-Json +$versionArray = @() | ConvertFrom-Json $versionArray += $latestBlock -Write-Host("versionArray: = {$versionArray}") +Write-Host("versionArray: = $versionArray") # Removing the oldest version if total count exceeds the max permissible count if($versionArray.Length -gt $maxVersionCount){ @@ -83,6 +83,6 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. $jsonX = @(ConvertTo-Json -Depth 4 $versionArray) -Write-Host("JsonArray: = {$jsonX}") +Write-Host("JsonArray: = $jsonX") $jsonX | Out-File $BuildOutputDir/dab-manifest.json From e51240fe1a00edea666464edb42b3c05cb870115 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 10:23:25 +0530 Subject: [PATCH 09/14] testing --- create_manifest_file.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index df01973dfd..2c88dba208 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -69,7 +69,7 @@ $latestBlock = $ExecutionContext.InvokeCommand.ExpandString($latestBlock) | Conv # Adding new block to the top of the list of released versions. # TODO: To use the data from the current manifest file and update it. -$versionArray = @() | ConvertFrom-Json +$versionArray = @() $versionArray += $latestBlock Write-Host("versionArray: = $versionArray") From 0afadecbc4fcd6a09632331fbebec9f3ce72f045 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 10:30:38 +0530 Subject: [PATCH 10/14] testing --- create_manifest_file.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 2c88dba208..ac5fc482d6 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -72,8 +72,6 @@ $latestBlock = $ExecutionContext.InvokeCommand.ExpandString($latestBlock) | Conv $versionArray = @() $versionArray += $latestBlock -Write-Host("versionArray: = $versionArray") - # Removing the oldest version if total count exceeds the max permissible count if($versionArray.Length -gt $maxVersionCount){ $versionArray = [System.Collections.ArrayList]$versionArray @@ -82,7 +80,5 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -$jsonX = @(ConvertTo-Json -Depth 4 $versionArray) -Write-Host("JsonArray: = $jsonX") -$jsonX | Out-File $BuildOutputDir/dab-manifest.json +$versionArray | ConvertTo-Json -Depth 4 | Out-File $BuildOutputDir/dab-manifest.json From 67f408001bac691a5d9ff837a9e0624c7f96c0fd Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 10:34:17 +0530 Subject: [PATCH 11/14] using json array directly --- create_manifest_file.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index ac5fc482d6..079ed3bc19 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -80,5 +80,5 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -$versionArray | ConvertTo-Json -Depth 4 | Out-File $BuildOutputDir/dab-manifest.json +ConvertTo-Json -Depth 4 $versionArray | Out-File $BuildOutputDir/dab-manifest.json From f0150a0de02534ee8dac4fb320f4d35b4b5624e0 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 17:48:24 +0530 Subject: [PATCH 12/14] testing --- create_manifest_file.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 079ed3bc19..ac5fc482d6 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -80,5 +80,5 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -ConvertTo-Json -Depth 4 $versionArray | Out-File $BuildOutputDir/dab-manifest.json +$versionArray | ConvertTo-Json -Depth 4 | Out-File $BuildOutputDir/dab-manifest.json From b75d09b5517dd6ca3881394e8cd8c4fee05ee9c8 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 17:56:19 +0530 Subject: [PATCH 13/14] fixing pipe issue --- create_manifest_file.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 18f5895353..079ed3bc19 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -22,7 +22,7 @@ $RIDs = "win-x64", "linux-x64", "osx-x64" foreach ($RID in $RIDs) { $fileName = "dab_$RID-$DabVersion.zip" $filePath = "$BuildOutputDir/publish/$BuildConfiguration/$RID/$fileName" - $download_url = "https://dataapibuilder.azureedge.net/releases/download/$versionTag/$fileName" + $download_url = "https://github.com/Azure/data-api-builder/releases/download/$versionTag/$fileName" $fileHashInfo = Get-FileHash $filePath $hash = $fileHashInfo.Hash switch ($RID) { @@ -80,5 +80,5 @@ if($versionArray.Length -gt $maxVersionCount){ # Updating the manifest file # Keeping Depth as 4, as by default ConvertTo-Json only support conversion till depth 2. -$versionArray | ConvertTo-Json -Depth 4 | Out-File $BuildOutputDir/dab-manifest.json +ConvertTo-Json -Depth 4 $versionArray | Out-File $BuildOutputDir/dab-manifest.json From 717a6982560dea40d3f6544500e6166851d43901 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 2 Dec 2022 17:57:04 +0530 Subject: [PATCH 14/14] fixing url --- create_manifest_file.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_manifest_file.ps1 b/create_manifest_file.ps1 index 079ed3bc19..2fcf51bf32 100644 --- a/create_manifest_file.ps1 +++ b/create_manifest_file.ps1 @@ -22,7 +22,7 @@ $RIDs = "win-x64", "linux-x64", "osx-x64" foreach ($RID in $RIDs) { $fileName = "dab_$RID-$DabVersion.zip" $filePath = "$BuildOutputDir/publish/$BuildConfiguration/$RID/$fileName" - $download_url = "https://github.com/Azure/data-api-builder/releases/download/$versionTag/$fileName" + $download_url = "https://dataapibuilder.azureedge.net/releases/download/$versionTag/$fileName" $fileHashInfo = Get-FileHash $filePath $hash = $fileHashInfo.Hash switch ($RID) {