You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eng/common/scripts/Prepare-Release.ps1
+60-11Lines changed: 60 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,50 @@
1
1
#Requires -Version6.0
2
2
3
+
<#
4
+
.SYNOPSIS
5
+
This script will do the necessary book keeping work needed to release a package.
6
+
7
+
.DESCRIPTION
8
+
This script will do a number of things when ran:
9
+
10
+
- It will read the current version from the project and will have you confirm if that is the version you want to ship
11
+
- It will take the package metadata and version and update the DevOps release tracking items with that information.
12
+
- If there is existing release work item it will update it and if not it will create one.
13
+
- It will validate that the changelog has a entry for the package version that you want to release as well as a timestamp.
14
+
15
+
.PARAMETERPackageName
16
+
The full package name of the package you want to prepare for release. (i.e Azure.Core, azure-core, @azure/core-https)
17
+
18
+
.PARAMETERServiceDirectory
19
+
Optional: The service directory where the package lives (e.g. /sdk/<service directory>/<package>). If a service directory isn't provided the script
20
+
will search for the package project by traversing all the packages under /sdk/, so the service directory is only a scoping mechanism.
21
+
22
+
.PARAMETERReleaseDate
23
+
Optional: If not shipping on the normal first Tuesday of the month you can specify a specific release date in the form of "MM/dd/yyyy".
24
+
25
+
.PARAMETERReleaseTrackingOnly
26
+
Optional: If this switch is passed then the script will only update the release work items and not update the versions in the local repo or validate the changelog.
The most common usage is to call the script passing the package name. Once the script is finished then you will have modified project and change log files.
32
+
You should make any additional changes to the change log to capture the changes and then submit the PR for the final changes before you do a release.
If you aren't ready to do the final versioning changes yet but you want to update release tracking information for shiproom pass in the -ReleaseTrackingOnly.
38
+
option. This should not modify or validate anything in the repo but will update the DevOps release tracking items. Once you are ready for the verioning changes
39
+
as well then come back and run the full script again without the -ReleaseTrackingOnly option and give it the same version information you did the first time.
40
+
#>
3
41
[CmdletBinding()]
4
42
param(
5
43
[Parameter(Mandatory=$true)]
6
44
[string]$PackageName,
7
45
[string]$ServiceDirectory,
8
-
[string]$ReleaseDate# Pass Date in the form MM/dd/yyyy"
46
+
[string]$ReleaseDate,# Pass Date in the form MM/dd/yyyy"
47
+
[switch]$ReleaseTrackingOnly=$false
9
48
)
10
49
Set-StrictMode-Version 3
11
50
@@ -27,6 +66,7 @@ function Get-ReleaseDay($baseDate)
Write-Host"Script is running in release tracking only mode so only updating the release tracker and not updating versions locally."
143
+
Write-Host"You will need to run this script again once you are ready to update the versions to ensure the projects and changelogs contain the correct version."
0 commit comments