in src/handlers/parameterValidator.ts [141:160]
private tryParseOldPublishProfile(xmlResult: any, out: IScmCredentials): boolean {
// uri: hazeng-fa-python38-azurecli.scm.azurewebsites.net
const options = xmlResult.publishData.publishProfile.filter((p: any) => {
return p.$.publishMethod === "MSDeploy"
});
if ((options || []).length == 0) {
Logger.Error('The old publish-profile does not contain MSDeploy publish method.');
return false;
}
const msDeploy = options[0].$;
const publishUrl = msDeploy.publishUrl.split(":")[0];
if (publishUrl.indexOf(".scm.") >= 0) {
out.uri = `https://${msDeploy.userName}:${msDeploy.userPWD}@${publishUrl}`;
out.username = msDeploy.userName;
out.password = msDeploy.userPWD;
out.appUrl = msDeploy.destinationAppUrl;
return true;
}
return false;
}