Skip to content
Open
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
24 changes: 17 additions & 7 deletions scripts/create-manifest-file.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ foreach ($targetFramework in $dotnetTargetFrameworks)
}

# Generating hash for nuget
$nugetFileName = "Microsoft.DataApiBuilder.$DabVersion.nupkg"
$nugetFilePath = "$BuildOutputDir/nupkg/$nugetFileName"
$fileHashInfo = Get-FileHash $nugetFilePath
$nuget_file_hash = $fileHashInfo.Hash
$download_url_nuget = "https://github.com/Azure/data-api-builder/releases/download/$versionTag/$nugetFileName"
$nugetCliFileName = "Microsoft.DataApiBuilder.$DabVersion.nupkg"
$nugetCliFilePath = "$BuildOutputDir/nupkg/$nugetCliFileName"
$fileCliHashInfo = Get-FileHash $nugetCliFilePath
$nuget_cli_file_hash = $fileCliHashInfo.Hash
$download_url_nuget_cli = "https://github.com/Azure/data-api-builder/releases/download/$versionTag/$nugetCliFileName"

$nugetCoreFileName = "Microsoft.DataApiBuilder.Core.$DabVersion.nupkg"
$nugetCoreFilePath = "$BuildOutputDir/nupkg/$nugetCoreFileName"
$fileCoreHashInfo = Get-FileHash $nugetCoreFilePath
$nuget_core_file_hash = $fileCoreHashInfo.Hash
$download_url_nuget_core = "https://github.com/Azure/data-api-builder/releases/download/$versionTag/$nugetCoreFileName"

# Creating new block to insert latest version
# String substitution requires hashtable to be wrapped in $( $hashtable['key'] ) to avoid parsing issues.
Expand All @@ -68,8 +74,12 @@ $latestBlock = @'
"sha": "$($frameworkPlatformFileHashMetadata["net8.0_osx-x64"])"
},
"nuget": {
"url": "${download_url_nuget}",
"sha": "${nuget_file_hash}"
"url": "${download_url_nuget_cli}",
"sha": "${nuget_cli_file_hash}"
},
"nuget-core": {
"url": "${download_url_nuget_core}",
"sha": "${nuget_core_file_hash}"
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions scripts/notice-generation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under the MIT License.

param (
[Parameter (Mandatory=$true)][string] $noticeFilePath,
[Parameter (Mandatory=$true)][string] $BuildArtifactStagingDir,
[Parameter (Mandatory=$true)][string] $BuildSourcesDir
)
Expand All @@ -17,9 +18,6 @@ Invoke-WebRequest $chiliCreamLicenseMetadataURL -UseBasicParsing |
$sqlClientSNILicenseFilePath = "$BuildSourcesDir/external_licenses/Microsoft.Data.SqlClient.SNI.5.2.0.License.txt"
$sqlClientSNILicense = Get-Content -Path $sqlClientSNILicenseFilePath -Raw

# Path of notice file generated in CI/CD pipeline.
$noticeFilePath = "$BuildSourcesDir/NOTICE.txt"

# Replace erroneous copyright, using [System.IO.File] for better performance than Get-Content and Set-Content
$content = [System.IO.File]::ReadAllText($noticeFilePath).Replace("(c) Microsoft 2023`r`n", "")
$content = [System.IO.File]::ReadAllText($noticeFilePath).Replace("(c) Microsoft 2024`r`n", "")
Expand Down
2 changes: 1 addition & 1 deletion src/Cli/Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<None Include="..\..\nuget\README.md" Pack="true" PackagePath="\" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\nuget\nuget_icon.png" Pack="true" PackagePath="\" />
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="\" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\NOTICE.txt" Pack="true" PackagePath="\" Condition="Exists('..\..\..\NOTICE.txt')" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\nuget_cli\NOTICE.txt" Pack="true" PackagePath="\" Condition="Exists('..\..\..\nuget_cli\NOTICE.txt')" CopyToOutputDirectory="PreserveNewest" />
Comment thread
RubenCerna2079 marked this conversation as resolved.
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Azure.DataApiBuilder.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<None Include="..\..\nuget\nuget_core\README.md" Pack="true" PackagePath="\" />
<None Include="..\..\nuget\nuget_icon.png" Pack="true" PackagePath="\" />
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="\" />
<None Include="..\..\NOTICE.txt" Pack="true" PackagePath="\" Condition="Exists('..\..\..\NOTICE.txt')" />
<None Include="..\..\nuget_core\NOTICE.txt" Pack="true" PackagePath="\" Condition="Exists('..\..\..\nuget_core\NOTICE.txt')" CopyToOutputDirectory="PreserveNewest" />
Comment thread
RubenCerna2079 marked this conversation as resolved.
</ItemGroup>

</Project>