Fix validation output and check the proposed updated version of the package (#23705)
Fix validation output and check the proposed updated version of the package (#23705)

* Fix the issue where ValidatePackage outputs a true-ish value before the function's result

* Use a different branch

* Validate the incoming version, not the existing verison of the package

* Revert "Use a different branch"

This reverts commit f6956e73d01d173f49315e4109891305e8f2f97d.

* Use only one `ValidatePackage`

* Use correct variable naming in the case of new packages
Azure/azure-sdk-for-java,Azure/azure-sdk-for-java,Azure/azure-sdk-for-java,Azure/azure-sdk-for-java,Azure/azure-sdk-for-java