-
Notifications
You must be signed in to change notification settings - Fork 2k
Re-apply internal staging versions of .NET in sync-internal-release command #6699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
79d03e9
Move internal versions method to helper class
lbussell 771c236
Factor out parse/serialization logic for internal staging builds
lbussell 9587f72
Add helper method for constructing mock command
lbussell 7c1ec48
Extract ICommand interface from BaseCommand
lbussell 163b241
Use InternalsVisibleTo for update dependencies tests
lbussell 4487387
Add FromStagingPipelineCommand dependency to SyncInternalReleaseCommand
lbussell bd3497d
Add git restore method
lbussell cf0d112
Add --repo-root argmuent to existing commands
lbussell 2eb7c5e
Make InternalVersionsHelper into a service
lbussell 398e89f
Split InternalVersions* into one file per type
lbussell cb32300
Implement first pass at re-applying internal builds
lbussell 996a5f7
Clean up tests and add more comments
lbussell ff5af1a
Add extra logging to GitRepoHelperFactory
lbussell 4bd8a49
Checkout ref instead of checkout branch for remote branches
lbussell 5545b06
Add extra git logging
lbussell c4b5cd7
Prevent duplicate logging when calling SpecificCommand more than once
lbussell 9c4414c
Allow multi-line log output
lbussell 9d4f4b0
Use existing CreatePullRequestOptions for SyncInternalReleaseCommand
lbussell 0966724
Make FromStagingPipelineCommand respect repo root
lbussell a4c388a
Reset using source branch sha instead of branch name
lbussell 79f1a41
Fix argument name for GetToolUpdaters
lbussell ca0901e
Add helper for shuttling around Manifest version variables and use "b…
lbussell 7167d00
Throw if sub-command had a non-zero exit code
lbussell c6c5bf9
Fix tests
lbussell 2edd452
Add branch variables to manifest.versions.json
lbussell 3c15992
Reference new Azdo URL extension in SpecificCommand
lbussell 397806b
Always trim org name
lbussell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
24 changes: 24 additions & 0 deletions
24
eng/update-dependencies/CreatePullRequestOptionsExtensions.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace Dotnet.Docker; | ||
|
|
||
| internal static class CreatePullRequestOptionsExtensions | ||
| { | ||
| public static string GetManifestVersionsFilePath(this CreatePullRequestOptions options) => | ||
| Path.Combine(options.RepoRoot, "manifest.versions.json"); | ||
|
|
||
| public static string GetAzdoRepoUrl(this CreatePullRequestOptions options) | ||
| { | ||
| // Validate that we have all the required pieces to construct the repo URL. | ||
| ArgumentException.ThrowIfNullOrWhiteSpace(options.AzdoOrganization); | ||
| ArgumentException.ThrowIfNullOrWhiteSpace(options.AzdoProject); | ||
| ArgumentException.ThrowIfNullOrWhiteSpace(options.AzdoRepo); | ||
| ArgumentException.ThrowIfNullOrWhiteSpace(options.TargetBranch); | ||
| ArgumentException.ThrowIfNullOrWhiteSpace(options.SourceBranch); | ||
|
|
||
| // AzdoOrganization is a URL like https://dev.azure.com/<org> | ||
| // A valid Azure DevOps repository URL is formatted like https://dev.azure.com/<org>/<project>/_git/<repo> | ||
| return $"{options.AzdoOrganization.TrimEnd('/')}/{options.AzdoProject}/_git/{options.AzdoRepo}"; | ||
| } | ||
| } | ||
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shares the same logic as
SyncInternalReleaseCommand.ExecuteAsync. It'd be nice if there was one method to format this URL.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made sure that
SpecificCommandandSyncInternalReleaseCommandboth use the extension method. Also centralized the trimming into the options class.