Azure / Azure/azure-sdk-tools

Prepare-Release.ps1 no longer detects ServiceDirectory when specifying assembly name alone

Open
#9,298 0 comments 0 reactions 0 assignees View on GitHub
EngSys
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

eng/common/scripts/Prepare-Release.ps1 used to automatically detect the ServiceDirectory when run with only the assembly name as an argument.

ex.
```
.\eng\common\scripts\Prepare-Release.ps1 Microsoft.Extensions.Azure
Get-AllPackageInfoFromRepo::Executing msbuild
dotnet msbuild /nologo /t:GetPackageInfo C:\src\azure-sdk-for-net\eng\service.proj /p:ServiceDirectory= /p:AddDevVersion=
```

specifying the service directory name allows the script to run successfully:

```
.\eng\common\scripts\Prepare-Release.ps1 Microsoft.Extensions.Azure -ServiceDirectory extensions
Get-AllPackageInfoFromRepo::Executing msbuild
dotnet msbuild /nologo /t:GetPackageInfo C:\src\azure-sdk-for-net\eng\service.proj /p:ServiceDirectory=extensions /p:AddDevVersion=
Using module powershell-yaml with version 0.4.2.
Using module powershell-yaml with version 0.4.2.
Using module powershell-yaml with version 0.4.2.
Using module powershell-yaml with version 0.4.2.
Using module powershell-yaml with version 0.4.2.
Package Name [ Microsoft.Extensions.Azure ]
Source directory [ extensions ]
Assuming release is in November with release date 11/05/2024
Latest released version: 1.7.6
Input the new version, or press Enter to use use current project version '1.8.0-beta.1':
```

Contributor guide

Open the contributing guide

Research direction

Start with eng/common/scripts/Prepare-Release.ps1 and reproduce the command using only Microsoft.Extensions.Azure, then compare it with the invocation that supplies -ServiceDirectory extensions. Trace how the script determines ServiceDirectory and verify that the assembly-only command reaches the same package-information step and release prompts as the explicit-directory command.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
release, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.