Skip to content

Commit

Permalink
[Beta][Core] Increase version to 2.7.0-beta.1 (#1637)
Browse files Browse the repository at this point in the history
[Beta][React] Increase version to 3.2.0-beta.1
[Beta][ReactNative] Increase version to 2.4.0-beta.1
- Update Deployment scripts to correctly handle pre-release tags
  • Loading branch information
MSNev committed Aug 17, 2021
1 parent f3f1a80 commit 6596e4e
Show file tree
Hide file tree
Showing 37 changed files with 483 additions and 331 deletions.
19 changes: 11 additions & 8 deletions AISKU/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/applicationinsights-web",
"version": "2.6.5",
"version": "2.7.0-beta.1",
"description": "Microsoft Application Insights JavaScript SDK - Web",
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"author": "Microsoft Application Insights Team",
Expand Down Expand Up @@ -65,12 +65,15 @@
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.4",
"@microsoft/applicationinsights-shims": "2.0.0",
"@microsoft/applicationinsights-analytics-js": "2.6.5",
"@microsoft/applicationinsights-channel-js": "2.6.5",
"@microsoft/applicationinsights-common": "2.6.5",
"@microsoft/applicationinsights-core-js": "2.6.5",
"@microsoft/applicationinsights-dependencies-js": "2.6.5",
"@microsoft/applicationinsights-properties-js": "2.6.5"
"@microsoft/applicationinsights-analytics-js": "2.7.0-beta.1",
"@microsoft/applicationinsights-channel-js": "2.7.0-beta.1",
"@microsoft/applicationinsights-common": "2.7.0-beta.1",
"@microsoft/applicationinsights-core-js": "2.7.0-beta.1",
"@microsoft/applicationinsights-dependencies-js": "2.7.0-beta.1",
"@microsoft/applicationinsights-properties-js": "2.7.0-beta.1"
},
"license": "MIT"
"license": "MIT",
"publishConfig": {
"tag": "beta"
}
}
12 changes: 6 additions & 6 deletions AISKU/scripts/listCdnVersions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ Function ValidateAccess
Function GetVersion(
[string] $name
) {
$regMatch = '^(.*\/)*([^\/\d]*\.)(\d+(\.\d+)*(-[^\.]+)?)(\.(?:gbl\.js|gbl\.min\.js|cjs\.js|cjs\.min\.js|js|min\.js|integrity\.json)(?:\.map)?)$'
$regMatch = '^(.*\/)*([^\/\d]*\.)(\d+(\.\d+)*(-[\w\d\-\+]+\.?[\d\-\+]*)?)(\.(?:gbl\.js|gbl\.min\.js|cjs\.js|cjs\.min\.js|js|min\.js|integrity\.json)(?:\.map)?)$'
$match = ($name | select-string $regMatch -AllMatches).matches
$contentType = $jsContentType

Expand Down Expand Up @@ -574,20 +574,20 @@ Function ListVersions(

if ($paths.ContainsKey($thePath) -ne $true) {
$paths[$thePath] = 1
$value = "{0,-28}" -f $thePath
$value = "{0,-35}" -f $thePath
$pathList = "$pathList$value "
} else {
$paths[$thePath] = ($paths[$thePath] + 1)
}
}

foreach ($thePath in $paths.Keys | Sort-Object) {
Log $(" - {1,-48} ({0})" -f $paths[$thePath],$thePath)
Log $(" - {1,-55} ({0})" -f $paths[$thePath],$thePath)
}

#Log $("v{0,-8} ({1,2}) - {2}" -f $key,$($fileList.Count),$pathList.Trim())
Log $("v{0,-16} ({1,2}) - {2}" -f $key,$($fileList.Count),$pathList.Trim())
} else {
Log $("v{0,-12} ({1,2})" -f $key,$($fileList.Count))
Log $("v{0,-16} ({1,2})" -f $key,$($fileList.Count))
foreach ($theBlob in $fileList) {
$blob = $theBlob.blob
$blob.ICloudBlob.FetchAttributes()
Expand All @@ -614,7 +614,7 @@ Function ListVersions(
$cacheControl = $cacheControl -replace "immutable","im"
$cacheControl = $cacheControl -replace ", "," "

Log $(" - {0,-48}{3,-13}{1,6:N1} Kb {2:yyyy-MM-dd HH:mm:ss} {4,10} {5}" -f $($blob.ICloudBlob.Container.Name + "/" + $blob.Name),($blob.Length/1kb),$blob.LastModified,$sdkVersion,$cacheControl,$metaTags)
Log $(" - {0,-55}{3,-16}{1,6:N1} Kb {2:yyyy-MM-dd HH:mm:ss} {4,10} {5}" -f $($blob.ICloudBlob.Container.Name + "/" + $blob.Name),($blob.Length/1kb),$blob.LastModified,$sdkVersion,$cacheControl,$metaTags)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion AISKU/scripts/publishReleaseToCdn.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Function GetReleaseFiles
Function GetVersion(
[string] $name
) {
$regMatch = '^(.*\/)*([^\/\d]*\.)(\d+(\.\d+)*(-[^\.]+)?)(\.(?:gbl\.js|gbl\.min\.js|cjs\.js|cjs\.min\.js|js|min\.js|integrity\.json)(?:\.map)?)$'
$regMatch = '^(.*\/)*([^\/\d]*\.)(\d+(\.\d+)*(-[\w\d\-\+]+\.?[\d\-\+]*)?)(\.(?:gbl\.js|gbl\.min\.js|cjs\.js|cjs\.min\.js|js|min\.js|integrity\.json)(?:\.map)?)$'
$match = ($name | select-string $regMatch -AllMatches).matches
$contentType = $jsContentType

Expand Down
58 changes: 48 additions & 10 deletions AISKU/scripts/setActiveCdnVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,36 @@ Function ValidateAccess
}
}

Function Get-VersionDetails (
[string] $ver
) {
[hashtable] $version = @{}
$version.full = $ver

$parts = $ver -split "\+", 2
if ($parts.Length -eq 2) {
$version.bldNum = $parts[1]
$ver = $parts[0]
} else {
$version.bldNum = ""
}

$parts = $ver -split "-", 2
$version.ver = $parts[0]
if ($parts.Length -eq 2) {
$version.preRel = $parts[1]
$version.type = ((($parts[1] -split "\+")[0] -split "\.")[0] -split "-")[0]
} else {
$version.preRel = ""
$version.type = "release"
}

return $version;
}
Function GetVersion(
[string] $name
) {
$regMatch = '^(.*\/)*([^\/\d]*\.)(\d+(\.\d+)*(-[^\.]+)?)(\.(?:gbl\.js|gbl\.min\.js|cjs\.js|cjs\.min\.js|js|min\.js|integrity\.json)(?:\.map)?)$'
$regMatch = '^(.*\/)*([^\/\d]*\.)(\d+(\.\d+)*(-[\w\d\-\+]+\.?[\d\-\+]*)?)(\.(?:gbl\.js|gbl\.min\.js|cjs\.js|cjs\.min\.js|js|min\.js|integrity\.json)(?:\.map)?)$'
$match = ($name | select-string $regMatch -AllMatches).matches
$contentType = $jsContentType

Expand Down Expand Up @@ -604,7 +630,8 @@ Function SetProperties(

Function SetActiveVersion(
[system.collections.generic.list[hashtable]] $fileList,
[string] $storePath
[string] $storePath,
[string] $container
) {

$destContext = GetContainerContext $storePath
Expand All @@ -617,31 +644,42 @@ Function SetActiveVersion(
foreach ($theBlob in $fileList) {
$blob = $theBlob.blob
$blobContext = $theBlob.context.azureContext
Log $("Copying: {0,-40} {1,6:N1} Kb {2:yyyy-MM-dd HH:mm:ss}" -f $($blob.ICloudBlob.Container.Name + "/" + $blob.Name),($blob.Length/1kb),$blob.LastModified)
Log $("Copying: {0,-55} {1,6:N1} Kb {2:yyyy-MM-dd HH:mm:ss}" -f $($blob.ICloudBlob.Container.Name + "/" + $blob.Name),($blob.Length/1kb),$blob.LastModified)

$version = GetVersion $blob.Name
if ($null -ne $version) {
$verParts = $version.ver.Split(".")
$verDetails = Get-VersionDetails $version.ver
$verParts = $verDetails.ver.Split(".")
if ($verParts.Length -ne 3) {
Log-Failure "ScriptError: Invalid Version! [$activeVersion]"
Write-LogFailure "ScriptError: Invalid Version! [$activeVersion]"
}

$preRel = ""
if ($verDetails.type -ne "release") {
$preRel = "-" + $verDetails.type

if ($verDetails.type -eq $container) {
# remove any "beta" tag when deploying to the beta container etc.
$preRel = ""
}
}

# Don't try and publish anything if any errors have been logged
if ($global:hasErrors -eq $true) {
exit 2
}
$stageName = "$($version.path)$($version.prefix)$($verParts[0]).$($verParts[1])$($version.ext).stage"

$stageName = "$($version.path)$($version.prefix)$($verParts[0]).$($verParts[1])$($preRel)$($version.ext).stage"
CopyBlob $blobContext $blob $destContext $stageName

$stagedBlob = Get-AzureStorageBlob -Context $destContext.azureContext -Container $destContext.storageContainer -Blob $stageName
SetProperties $stagedBlob "[$($destContext.storageContainer)]/$($blob.Name)" $version.ver

$minorName = "$($version.path)$($version.prefix)$($verParts[0]).$($verParts[1])$($version.ext)"
$minorName = "$($version.path)$($version.prefix)$($verParts[0]).$($verParts[1])$($preRel)$($version.ext)"
CopyBlob $blobContext $stagedBlob $destContext $minorName

if ($minorOnly -eq $false) {
$majorName = "$($version.path)$($version.prefix)$($verParts[0])$($version.ext)"
$majorName = "$($version.path)$($version.prefix)$($verParts[0])$($preRel)$($version.ext)"
CopyBlob $blobContext $stagedBlob $destContext $majorName
}

Expand Down Expand Up @@ -742,6 +780,6 @@ if ($global:hasErrors -eq $true) {
exit 2
}

SetActiveVersion $files[$activeVersion] $storePath
SetActiveVersion $files[$activeVersion] $storePath $container

Log "======================================================================"
13 changes: 8 additions & 5 deletions AISKULight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/applicationinsights-web-basic",
"version": "2.6.5",
"version": "2.7.0-beta.1",
"description": "Microsoft Application Insights Javascript SDK core and channel",
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"author": "Microsoft Application Insights Team",
Expand Down Expand Up @@ -45,9 +45,12 @@
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.4",
"@microsoft/applicationinsights-shims": "2.0.0",
"@microsoft/applicationinsights-common": "2.6.5",
"@microsoft/applicationinsights-channel-js": "2.6.5",
"@microsoft/applicationinsights-core-js": "2.6.5"
"@microsoft/applicationinsights-common": "2.7.0-beta.1",
"@microsoft/applicationinsights-channel-js": "2.7.0-beta.1",
"@microsoft/applicationinsights-core-js": "2.7.0-beta.1"
},
"license": "MIT"
"license": "MIT",
"publishConfig": {
"tag": "beta"
}
}
30 changes: 30 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Releases

## 2.7.0 (General Release -- Not Yet Released)

___Major change___: Upgrades build environment to TypeScript 4.x

[2.7.0-beta.1 Milestone](https://github.com/microsoft/ApplicationInsights-JS/)milestone/54

## Changelog

- #617 Add performance.mark and performance.measure for performance browser tool integration

### 2.7.0-beta.1 (August 17th, 2021)

- #1171 ___Update to TypeScript 4.x___
- #1526 [TypeScript Compile Error] Property 'sessionManager' does not exist on type 'ITelemetryContext'
- #1627 Add sesId to allow access to sessionManager session info
- #1471 Convert undefined to blank in customDimensions?
- #1630 Convert undefined custom properties to empty string
- #1585 ai_user cookie not present after reenabling the cookie
- #1561 How to enrich dependencies logs with context at the beginning of api call?
- #1624 Provide a way to enrich dependencies logs with context at the beginning of api call
- #1633 Add GitHub Automated Lock closed issue action

### Update React plugin to v3.2.0-beta.1

- Update Core dependency to v2.7.0-beta.1 Core changes

### Update React Native plugin to v2.4.0-beta.1

- Update Core dependency to v2.7.0-beta.1 Core changes

## 2.6.5 (August 3rd, 2021)

[2.6.5 Milestone](https://github.com/microsoft/ApplicationInsights-JS/milestone/53)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ export class SenderTests extends AITestClass {
QUnit.assert.ok(baseData.ver);
QUnit.assert.equal(2, baseData.ver);

QUnit.assert.equal("javascript:2.6.5", appInsightsEnvelope.tags["ai.internal.sdkVersion"]);
QUnit.assert.equal("javascript:2.7.0-beta.1", appInsightsEnvelope.tags["ai.internal.sdkVersion"]);
}
})

Expand Down
11 changes: 7 additions & 4 deletions channels/applicationinsights-channel-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/applicationinsights-channel-js",
"version": "2.6.5",
"version": "2.7.0-beta.1",
"description": "Microsoft Application Insights JavaScript SDK Channel",
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"author": "Microsoft Application Insights Team",
Expand Down Expand Up @@ -48,8 +48,11 @@
"dependencies": {
"@microsoft/dynamicproto-js": "^1.1.4",
"@microsoft/applicationinsights-shims": "2.0.0",
"@microsoft/applicationinsights-core-js": "2.6.5",
"@microsoft/applicationinsights-common": "2.6.5"
"@microsoft/applicationinsights-core-js": "2.7.0-beta.1",
"@microsoft/applicationinsights-common": "2.7.0-beta.1"
},
"license": "MIT"
"license": "MIT",
"publishConfig": {
"tag": "beta"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function _setValueIf<T>(target:T, field:keyof T, value:any) {
}

export abstract class EnvelopeCreator {
public static Version = "2.6.5";
public static Version = "2.7.0-beta.1";

protected static extractPropsAndMeasurements(data: { [key: string]: any }, properties: { [key: string]: any }, measurements: { [key: string]: any }) {
if (!isNullOrUndefined(data)) {
Expand Down
Loading

0 comments on commit 6596e4e

Please sign in to comment.