Skip to content

Commit

Permalink
Add spec index automation
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard committed Dec 6, 2023
1 parent adfae99 commit f92e8e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 8 additions & 0 deletions eng/pipelines/version-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ steps:
git clone https://$(azuresdk-github-pat)@github.com/Azure/azure-rest-api-specs $(System.DefaultWorkingDirectory)/azure-rest-api-specs
displayName: Clone azure-rest-api-specs repo

- task: PowerShell@2
displayName: Update Rest Specs
inputs:
pwsh: true
filePath: $(AzureSDKClonePath)/eng/scripts/Update-Spec-Versions.ps1
arguments: >
-specsRoot $(System.DefaultWorkingDirectory)/azure-rest-api-specs/
- bash: |
npm install
workingDirectory: $(AzureSDKClonePath)/eng/scripts/inventory-dashboard
Expand Down
8 changes: 1 addition & 7 deletions eng/scripts/Update-Spec-Versions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ $ProgressPreference = "SilentlyContinue"; # Disable invoke-webrequest progress d

. (Join-Path $PSScriptRoot PackageList-Helpers.ps1)

# spec - json file
# path
# name
# version
# TODO: map to SDK library via readme.md or tspconfig.yaml

function CreateSpec($jsonFilesInPath, $relSpecPath)
{
if ($relSpecPath -notmatch "^(?<serviceFamily>[^/]+)/(?<type>data-plane|resource-manager)/(?<rpPath>.+)?(?<verType>preview|stable)/(?<version>[^/]+)$") {
Expand Down Expand Up @@ -88,7 +82,7 @@ function CreateSpec($jsonFilesInPath, $relSpecPath)
function FindAllSpecs($specsRoot)
{
$potentialSpecs = Get-ChildItem -Recurse -Include *.json $specsRoot
#TODO: Map to tspconfig if
#TODO: Map to tspconfig
#$potentialTypeSpecs = Get-ChildItem -Recurse -Include tspconfig.yaml $specsRoot

$processedPaths = @{}
Expand Down
2 changes: 1 addition & 1 deletion releases/latest/specs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Azure Rest API Specs(Latest)
title: Azure Rest API Specs (Latest)
layout: default
sidebar: releases_sidebar
header: true
Expand Down

0 comments on commit f92e8e6

Please sign in to comment.