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

Adding MAR Manifest file generator #726

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

krbar
Copy link
Contributor

@krbar krbar commented Mar 7, 2024

Overview/Summary

Adding script to re-create the MAR Manifest file from the current CSV module indexes.

This PR fixes/adds/changes/removes

  1. adds Script utilities/tools/MARManifestGenerator/Set-MARManifest.ps1
  2. adds Header/Template file utilities/tools/MARManifestGenerator/src/manifestHeader.yml, which contains the constant part of the manifest file

Script usage example:

# Load the function Set-MARManifest
. .\utilities\tools\MARManifestGenerator\Set-MARManifest.ps1  

# Run the function
Set-MARManifest -OutputFile .\bicep-new.yml 

Breaking Changes

none

As part of this Pull Request I have

  • Read the Contribution Guide and ensured this PR is compliant with the guide
  • Checked for duplicate Pull Requests
  • Associated it with relevant GitHub Issues or ADO Work Items (Internal Only)
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Ensured PR tests are passing
  • Updated relevant and associated documentation (e.g. Contribution Guide, Docs etc.)

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Mar 7, 2024
@krbar krbar marked this pull request as ready for review March 7, 2024 20:10
@krbar krbar requested a review from a team as a code owner March 7, 2024 20:10
@matebarabas matebarabas added Type: Hygiene 🧹 things related to testing, issue triage etc. and removed Needs: Triage 🔍 Maintainers need to triage still labels Mar 7, 2024
@krbar krbar marked this pull request as draft March 7, 2024 21:35
@krbar krbar marked this pull request as ready for review April 6, 2024 23:09
[CmdletBinding(SupportsShouldProcess)]
param (
[Parameter(Mandatory = $false)]
[string] $OutputFile = $(Join-Path $PSScriptRoot 'bicep.yml')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[string] $OutputFile = $(Join-Path $PSScriptRoot 'bicep.yml')
[string] $OutputFile = Join-Path $PSScriptRoot 'bicep.yml'

# Loop through each item in the filtered data
foreach ($item in $formattedBicepFullCsv) {
# Remove '@Azure/' from the ModuleOwnersGHTeam property
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure/', ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure/', ''
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure\/', ''

Careful with the regex

# Remove '@Azure/' from the ModuleOwnersGHTeam property
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure/', ''
# Remove '@Azure/' from the ModuleContributorsGHTeam property
$item.ModuleContributorsGHTeam = $item.ModuleContributorsGHTeam -replace '@Azure/', ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$item.ModuleContributorsGHTeam = $item.ModuleContributorsGHTeam -replace '@Azure/', ''
$item.ModuleContributorsGHTeam = $item.ModuleContributorsGHTeam -replace '@Azure\/', ''

@@ -0,0 +1,330 @@
version: 2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

@matebarabas , a comment of rememberence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Hygiene 🧹 things related to testing, issue triage etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants