This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
packages = glob.glob('C:/repo/sdk-for-python/sdk/*/*/setup.py') | |
for pkg in packages: | |
name = os.path.dirname(pkg).split(os.sep)[-1] | |
path = os.path.dirname(pkg.split('python/')[1]).replace(os.sep, '/') | |
print('{} = {{path = "{}"}}'.format(name, path)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[string]$RepoId, | |
[string]$PRNumber, | |
[string]$RepoRoot = "C:/repo/azure-docs-sdk-python" | |
) | |
$API_URL = "https://api.github.com/repos/$RepoId" | |
function FireAPIRequest($url, $method, $body = $null) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# intended to live in the folder eng/tox/ within azure-sdk-for-python | |
from tox_helper_tasks import get_package_details | |
import os | |
import argparse | |
import glob | |
import sys | |
setup_parser_path = os.path.abspath( | |
os.path.join(os.path.abspath(__file__), "..", "..", "versioning") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
$targetFolder, | |
$suffix="-pre.md" | |
) | |
Get-ChildItem -Path $targetFolder "*$suffix" | ForEach-Object { | |
Write-Host $_ | |
$NewName = $_.Name.replace($suffix, ".md") | |
$Destination = Join-Path -Path $_.Directory.FullName -ChildPath $NewName | |
Move-Item -Path $_.FullName -Destination $Destination -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
$targetFolder, | |
$language, | |
$previewMoniker | |
) | |
$results = gci -Path $targetFolder -Filter "*-pre.md" | |
foreach ($readme in $results) { | |
Write-Host "{" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumes that NPM is installed and available | |
$indexUrl = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/js-packages.csv" | |
$interrogativeUrl = "https://docs.microsoft.com/en-us/javascript/api" | |
$content = (Invoke-RestMethod -Method GET -Uri $indexUrl) | |
# assumes that the location is common | |
$results = $content.Split("`n") | ? { $_ } | |
$results = $results[1..($results.Length-1)] | |
$indexPackages = @{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$users = "<comma separated list of github users>" | |
# notice that we substring(1). This is because if you grab the gh users from a codeowners file, there will be a leading @ | |
# the substring rips it off. | |
$filtered_users = $users.Split(",") | % {$_.Trim()} | ? { $_ } | % { $_.SubString(1) } | Select -Unique | |
$not_added = @() | |
$headers = @{ | |
"Content-Type" = "application/json" | |
"Authorization" = "token $($env:GH_TOKEN)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
from subprocess import check_call, CalledProcessError | |
import pdb | |
import logging | |
import sys | |
import shutil | |
import requests | |
from io import StringIO | |
import csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example Usage: ./copy_readmes.ps1 -CodeRepo C:/repo/sdk-for-python -DocRepo C:/repo/azure-docs-sdk-python | |
# Highly recommended that you use Powershell Core. | |
# git reset --hard origin/smoke-test on the doc repo prior to running this | |
param ( | |
[String]$CodeRepo, | |
[String]$DocRepo, | |
[String]$TargetServices = "keyvault,storage" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# transition old style versioning strategy to new. inclusive of existing versions in both strategies | |
param ( | |
$AzCopy, | |
$SASKey, | |
$Language, | |
$BlobName, | |
$DocLocation, | |
$AccountKey | |
) | |
$AccountName = ($BlobName.Replace("https://", "") -Split "\.")[0] |