Skip to content
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
21 changes: 15 additions & 6 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function Get-javascript-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgNa
if (Test-Path $projectPath)
{
$projectJson = Get-Content $projectPath | ConvertFrom-Json
$jsStylePkgName = $pkgName.replace("azure-", "@azure/")
if ($projectJson.name -eq "$jsStylePkgName")
$jsStylePkgName = $projectJson.name.Replace("@", "").Replace("/", "-")
if ($pkgName -eq "$jsStylePkgName")
Comment thread
praveenkuttappan marked this conversation as resolved.
{
return [PackageProps]::new($projectJson.name, $projectJson.version, $pkgPath, $serviceDirectory)
}
Expand Down Expand Up @@ -87,15 +87,24 @@ function Publish-javascript-GithubIODocs ($DocLocation, $PublicArtifactLocation)
$PublishedDocs = Get-ChildItem "$($DocLocation)/documentation" | Where-Object -FilterScript { $_.Name.EndsWith(".zip") }

foreach ($Item in $PublishedDocs)
{
$PkgName = "azure-$($Item.BaseName)"
Write-Host $PkgName
{
Expand-Archive -Force -Path "$($DocLocation)/documentation/$($Item.Name)" -DestinationPath "$($DocLocation)/documentation/$($Item.BaseName)"
$dirList = Get-ChildItem "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)" -Attributes Directory

if ($dirList.Length -eq 1)
{
$DocVersion = $dirList[0].Name
$pkgs = Get-ChildItem -Path $PublicArtifactLocation -Include "*.tgz" -Recurse -File
Comment thread
praveenkuttappan marked this conversation as resolved.
# set default package name
$PkgName = "azure-$($Item.BaseName)"
if ($pkgs -and $pkgs.Count -eq 1)
{
$parsedPackage = Get-javascript-PackageInfoFromPackageFile $pkgs[0] $PublicArtifactLocation
$PkgName = $parsedPackage.PackageId.Replace("@", "").Replace("/", "-")
}
Comment thread
praveenkuttappan marked this conversation as resolved.
else{
Write-Host "Package info is not available from artifact. Assuming package is in default scope @azure."
}
Write-Host "Uploading Doc for $($PkgName) Version:- $($DocVersion)..."
$releaseTag = RetrieveReleaseTag "NPM" $PublicArtifactLocation
Comment thread
praveenkuttappan marked this conversation as resolved.
Upload-Blobs -DocDir "$($DocLocation)/documentation/$($Item.BaseName)/$($Item.BaseName)/$($DocVersion)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag
Expand All @@ -111,7 +120,7 @@ function Get-javascript-GithubIoDocIndex() {
# Fetch out all package metadata from csv file.
$metadata = Get-CSVMetadata -MetadataUri $MetadataUri
# Get the artifacts name from blob storage
$artifacts = Get-BlobStorage-Artifacts -blobStorageUrl $BlobStorageUrl -blobDirectoryRegex "^javascript/azure-(.*)/$" -blobArtifactsReplacement "@azure/`${1}"
$artifacts = Get-BlobStorage-Artifacts -blobStorageUrl $BlobStorageUrl -blobDirectoryRegex "^javascript/([a-z]*)-(.*)/$" -blobArtifactsReplacement "@`${1}/`${2}"
# Build up the artifact to service name mapping for GithubIo toc.
$tocContent = Get-TocMapping -metadata $metadata -artifacts $artifacts
# Generate yml/md toc files and build site.
Expand Down
2 changes: 1 addition & 1 deletion eng/tools/analyze-deps/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const dumpRushPackages = (rushPackages, internalPackages, external) => {
};

const resolveRushPackageDeps = (packages, internalPackages, pnpmLock, pkgId, external) => {
const yamlKey = `@rush-temp/${packages[pkgId].name.replace("@azure/", "")}`;
const yamlKey = `@rush-temp/${packages[pkgId].name.replace(/@[a-z]*\//i, "")}`;
const packageKey = pnpmLock.dependencies[yamlKey];
const resolvedDeps = pnpmLock.packages[packageKey].dependencies;

Expand Down
2 changes: 1 addition & 1 deletion eng/tools/dependency-testing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ async function main(argv) {
const testFolder = argv["test-folder"];
const dryRun = argv["dry-run"];

const packageName = artifactName.replace("azure-", "@azure/");
const packageName = artifactName.replace(/"?([a-z]*)"?-/i, "@$1/");
const targetPackage = await getPackageFromRush(repoRoot, packageName);
const targetPackagePath = path.join(repoRoot, targetPackage.projectFolder);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function getPackageUrl(language, package, version) {
$(function () {
$('h4').each(function () {
var pkgName = $(this).text()
.replace("@azure/", "azure-");
.replace("@", "").replace("/", "-");
populateIndexList($(this), pkgName)
});
})
3 changes: 1 addition & 2 deletions eng/tools/versioning/increment.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ async function main(argv) {
const repoRoot = argv["repo-root"];
const dryRun = argv["dry-run"];

const packageName = artifactName.replace("azure-", "@azure/");
const rushSpec = await packageUtils.getRushSpec(repoRoot);
const targetPackage = rushSpec.projects.find(
packageSpec => packageSpec.packageName == packageName
packageSpec => packageSpec.packageName.replace("@", "").replace("/", "-") == artifactName
);

const targetPackagePath = path.join(repoRoot, targetPackage.projectFolder);
Expand Down
3 changes: 1 addition & 2 deletions eng/tools/versioning/set-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ async function main(argv) {
const repoRoot = argv["repo-root"];
const dryRun = argv["dry-run"];

const packageName = artifactName.replace("azure-", "@azure/");
const rushSpec = await packageUtils.getRushSpec(repoRoot);

const targetPackage = rushSpec.projects.find(
packageSpec => packageSpec.packageName == packageName
packageSpec => packageSpec.packageName.replace("@", "").replace("/", "-") == packageName
);

const targetPackagePath = path.join(repoRoot, targetPackage.projectFolder);
Expand Down
3 changes: 3 additions & 0 deletions sdk/template/template/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Release History
## 1.0.10-beta.1 (2020-11-16)
- Test Release Pipeline

## 1.0.9-beta.13 (2020-10-13)
- Test Release Pipeline

Expand Down
2 changes: 1 addition & 1 deletion sdk/template/template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure/template",
"version": "1.0.9-beta.13",
"version": "1.0.10-beta.1",
"description": "Template Library with typescript type definitions for node.js and browser.",
"sdk-type": "client",
"main": "dist/index.js",
Expand Down