Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Generate bill of materials #780

Merged
merged 1 commit into from
May 15, 2019
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,5 @@ TEST-*.xml

# vscode settings folder
.vscode/tasks.json

*.bom.xml
11 changes: 11 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ steps:
#verbose: # Optional
#quiet: # Optional

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '.\src\boms'
includeRootFolder: false
#archiveType: 'zip' # Options: zip, 7z, tar, wim
#tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
archiveFile: '$(Build.ArtifactStagingDirectory)/UniversalDashboard.Community.Bom.$(Build.BuildId).zip'
#replaceExistingArchive: true
#verbose: # Optional
#quiet: # Optional

# Publish Pipeline Artifact
- task: PublishPipelineArtifact@0
inputs:
Expand Down
4 changes: 3 additions & 1 deletion src/UniversalDashboard.MaterialUI/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ public/
output/

classes/bin
classes/obj
classes/obj

*.bom.xml
1 change: 1 addition & 0 deletions src/UniversalDashboard.MaterialUI/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Remove-Item -Path "$BuildFolder\public" -Force -Recurse

New-Item -Path $OutputPath -ItemType Directory

& cyclonedx-bom -o materialui.bom.xml
npm install
npm run build

Expand Down
1 change: 1 addition & 0 deletions src/UniversalDashboard.Materialize/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Remove-Item -Path "$BuildFolder\public" -Force -ErrorAction SilentlyContinue -Re
New-Item -Path $OutputPath -ItemType Directory
New-Item -Path $OutputPath\Scripts -ItemType Directory

& cyclonedx-bom -o materialize.bom.xml
npm install
npm run build

Expand Down
353 changes: 353 additions & 0 deletions src/bom.xml

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion src/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ if ($powerShellGet.Version -lt ([Version]'1.6.0')) {
Import-Module PowerShellGet -Force
}

& dotnet tool install --global CycloneDX

& dotnet CycloneDX "$PSScriptRoot/UniversalDashboard.Sln" -o ".\"

Rename-Item "bom.xml" "dotnet.bom.xml"

& dotnet clean "$PSScriptRoot\UniversalDashboard\UniversalDashboard.csproj"
& dotnet restore "$PSScriptRoot\UniversalDashboard\UniversalDashboard.csproj"

Expand All @@ -30,6 +36,8 @@ Push-Location "$PSScriptRoot\client"

Start-Process npm -ArgumentList "install" -Wait

& npm install -g @cyclonedx/bom
& cyclonedx-bom -o core.bom.xml
& npm run build
Pop-Location

Expand All @@ -52,6 +60,14 @@ if ((Test-Path $outputDirectory)) {

New-Item -ItemType Directory $outputDirectory

$bomDirectory = Join-Path $PSScriptRoot "boms"
if ((Test-Path $bomDirectory)) {
Remove-Item $bomDirectory -Force -Recurse
}

New-Item -ItemType Directory $bomDirectory


$net472 = Join-Path $outputDirectory "net472"
$netstandard20 = Join-Path $outputDirectory "netstandard2.0"
$help = Join-Path $outputDirectory "en-US"
Expand Down Expand Up @@ -99,4 +115,6 @@ Copy-Item "$PSScriptRoot\UniversalDashboard.MaterialUI\output\UniversalDashboard

if (-not $NoHelp) {
New-ExternalHelp -Path "$PSScriptRoot\UniversalDashboard\Help" -OutputPath $help
}
}

Get-ChildItem $PSScriptRoot -Include "*.bom.xml" -Recurse | ForEach-Object { Copy-Item $_.FullName ".\boms" }