Move README and TPN templates to src\VirtualMonoRepo
(#15478)
This commit is contained in:
commit
bda2c1cc61
10 changed files with 50 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
|||
"isRoot": true,
|
||||
"tools": {
|
||||
"microsoft.dotnet.darc": {
|
||||
"version": "1.1.0-beta.23106.1",
|
||||
"version": "1.1.0-beta.23107.1",
|
||||
"commands": [
|
||||
"darc"
|
||||
]
|
||||
|
|
|
@ -208,13 +208,13 @@
|
|||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>c453dfef2f41533de5cb03b2115aab9d0dfc74c6</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23106.1">
|
||||
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23107.1">
|
||||
<Uri>https://github.com/dotnet/arcade-services</Uri>
|
||||
<Sha>8b6dc24326637735543511b2b5c5e6331adc293b</Sha>
|
||||
<Sha>c6f3ec3b751020f757695bcd351b1cbb179e21bd</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.DarcLib" Version="1.1.0-beta.23106.1">
|
||||
<Dependency Name="Microsoft.DotNet.DarcLib" Version="1.1.0-beta.23107.1">
|
||||
<Uri>https://github.com/dotnet/arcade-services</Uri>
|
||||
<Sha>8b6dc24326637735543511b2b5c5e6331adc293b</Sha>
|
||||
<Sha>c6f3ec3b751020f757695bcd351b1cbb179e21bd</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="8.0.0-alpha.1.22557.12">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/arcade-services -->
|
||||
<MicrosoftDotNetDarcLibVersion>1.1.0-beta.23106.1</MicrosoftDotNetDarcLibVersion>
|
||||
<MicrosoftDotNetDarcLibVersion>1.1.0-beta.23107.1</MicrosoftDotNetDarcLibVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/winforms -->
|
||||
|
|
|
@ -34,5 +34,7 @@ steps:
|
|||
--tmp $(Agent.TempDirectory)
|
||||
--branch ${{ parameters.vmrBranch }}
|
||||
--target-ref ${{ parameters.targetRef }}
|
||||
--readme-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/README.template.md
|
||||
--tpn-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt
|
||||
displayName: Synchronize dotnet/dotnet
|
||||
workingDirectory: $(Agent.BuildDirectory)/installer
|
||||
|
|
|
@ -9,7 +9,7 @@ parameters:
|
|||
- name: vmrBranch
|
||||
displayName: dotnet/dotnet branch to push to
|
||||
type: string
|
||||
default: ''
|
||||
default: ' '
|
||||
|
||||
- name: disableVmrBuild
|
||||
displayName: Skip source-building the VMR
|
||||
|
@ -17,9 +17,9 @@ parameters:
|
|||
default: false
|
||||
|
||||
variables:
|
||||
- ${{ if ne(parameters.vmrBranch, '') }}:
|
||||
- ${{ if ne(parameters.vmrBranch, ' ') }}:
|
||||
- name: VmrBranch
|
||||
value: ${{ parameters.vmrBranch }}
|
||||
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
|
||||
- ${{ else }}:
|
||||
- name: VmrBranch
|
||||
value: ${{ replace(replace(variables['System.PullRequest.TargetBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
|
||||
|
|
|
@ -22,7 +22,7 @@ parameters:
|
|||
variables:
|
||||
- ${{ if ne(parameters.vmrBranch, ' ') }}:
|
||||
- name: VmrBranch
|
||||
value: ${{ parameters.vmrBranch }}
|
||||
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
|
||||
- ${{ else }}:
|
||||
- name: VmrBranch
|
||||
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
|
||||
|
|
|
@ -19,12 +19,12 @@ parameters:
|
|||
- name: vmrBranch
|
||||
displayName: dotnet/dotnet branch to push to
|
||||
type: string
|
||||
default: ''
|
||||
default: ' '
|
||||
|
||||
variables:
|
||||
- ${{ if ne(parameters.vmrBranch, '') }}:
|
||||
- ${{ if ne(parameters.vmrBranch, ' ') }}:
|
||||
- name: VmrBranch
|
||||
value: ${{ parameters.vmrBranch }}
|
||||
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
|
||||
- ${{ else }}:
|
||||
- name: VmrBranch
|
||||
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
|
||||
|
|
|
@ -52,6 +52,12 @@
|
|||
### Defaults to the revision of the parent installer repo
|
||||
### --debug
|
||||
### Optional. Turns on the most verbose logging for the VMR tooling
|
||||
### --readme-template
|
||||
### Optional. Template for VMRs README.md used for regenerating the file to list the newest versions of components.
|
||||
### Defaults to src/VirtualMonoRepo/README.template.md
|
||||
### --tpn-template
|
||||
### Optional. Template for the header of VMRs THIRD-PARTY-NOTICES file.
|
||||
### Defaults to src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
|
||||
|
@ -89,6 +95,8 @@ vmr_dir=''
|
|||
vmr_branch='main'
|
||||
target_ref=''
|
||||
verbosity=verbose
|
||||
tpn_template=''
|
||||
readme_template=''
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
|
||||
|
@ -112,6 +120,14 @@ while [[ $# -gt 0 ]]; do
|
|||
target_ref=$2
|
||||
shift
|
||||
;;
|
||||
--readme-template)
|
||||
readme_template=$2
|
||||
shift
|
||||
;;
|
||||
--tpn-template)
|
||||
tpn_template=$2
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
print_help
|
||||
exit 0
|
||||
|
@ -131,11 +147,29 @@ if [[ ! -d "$installer_dir" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$readme_template" ]]; then
|
||||
readme_template="$installer_dir/src/VirtualMonoRepo/README.template.md"
|
||||
fi
|
||||
|
||||
if [[ -z "$tpn_template" ]]; then
|
||||
tpn_template="$installer_dir/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt"
|
||||
fi
|
||||
|
||||
if [[ -z "$tmp_dir" ]]; then
|
||||
fail "Missing --tmp-dir argument. Please specify the path to the temporary folder where the repositories will be cloned"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$readme_template" ]]; then
|
||||
fail "File '$readme_template' does not exist. Please specify a valid path to the README template"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$tpn_template" ]]; then
|
||||
fail "File '$tpn_template' does not exist. Please specify a valid path to the THIRD-PARTY-NOTICES template"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$vmr_dir" ]]; then
|
||||
vmr_dir="$tmp_dir/dotnet"
|
||||
fi
|
||||
|
@ -180,7 +214,7 @@ fi
|
|||
highlight "Starting the synchronization to '$target_ref'.."
|
||||
set +e
|
||||
|
||||
if "$dotnet" darc vmr update --vmr "$vmr_dir" --tmp "$tmp_dir" --$verbosity --recursive --additional-remotes "installer:$installer_dir" "installer:$target_ref"; then
|
||||
if "$dotnet" darc vmr update --vmr "$vmr_dir" --tmp "$tmp_dir" --$verbosity --recursive --readme-template "$readme_template" --tpn-template "$tpn_template" --additional-remotes "installer:$installer_dir" "installer:$target_ref"; then
|
||||
highlight "Synchronization succeeded"
|
||||
else
|
||||
fail "Synchronization of dotnet/dotnet to '$target_ref' failed!"
|
||||
|
|
Loading…
Add table
Reference in a new issue