add args to vmr sync

This commit is contained in:
MilenaHristova 2023-02-08 13:44:25 +01:00
parent 608d979a03
commit 195977b515
2 changed files with 13 additions and 1 deletions

View file

@ -34,5 +34,7 @@ steps:
--tmp $(Agent.TempDirectory) --tmp $(Agent.TempDirectory)
--branch ${{ parameters.vmrBranch }} --branch ${{ parameters.vmrBranch }}
--target-ref ${{ parameters.targetRef }} --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 displayName: Synchronize dotnet/dotnet
workingDirectory: $(Agent.BuildDirectory)/installer workingDirectory: $(Agent.BuildDirectory)/installer

View file

@ -89,6 +89,8 @@ vmr_dir=''
vmr_branch='main' vmr_branch='main'
target_ref='' target_ref=''
verbosity=verbose verbosity=verbose
tpn_template=''
readme_template=''
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
@ -112,6 +114,14 @@ while [[ $# -gt 0 ]]; do
target_ref=$2 target_ref=$2
shift shift
;; ;;
--readme-template)
readme_template=$2
shift
;;
--tpn-template)
tpn_template=$2
shift
;;
-h|--help) -h|--help)
print_help print_help
exit 0 exit 0
@ -180,7 +190,7 @@ fi
highlight "Starting the synchronization to '$target_ref'.." highlight "Starting the synchronization to '$target_ref'.."
set +e 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" highlight "Synchronization succeeded"
else else
fail "Synchronization of dotnet/dotnet to '$target_ref' failed!" fail "Synchronization of dotnet/dotnet to '$target_ref' failed!"