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)
--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

View file

@ -89,6 +89,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 +114,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
@ -180,7 +190,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!"