Skip to content

Instantly share code, notes, and snippets.

@BasLijten
Created April 11, 2018 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BasLijten/0d76b48baea0a0a6c0e4bce661ac1307 to your computer and use it in GitHub Desktop.
Save BasLijten/0d76b48baea0a0a6c0e4bce661ac1307 to your computer and use it in GitHub Desktop.
export async function isMSDeployPackage(webAppPackage: string ) {
var isParamFilePresent = false;
var pacakgeComponent = await zipUtility.getArchivedEntries(webAppPackage);
if (((pacakgeComponent["entries"].indexOf("parameters.xml") > -1) || (pacakgeComponent["entries"].indexOf("Parameters.xml") > -1)) &&
((pacakgeComponent["entries"].indexOf("systemInfo.xml") > -1) || (pacakgeComponent["entries"].indexOf("systeminfo.xml") > -1))) {
isParamFilePresent = true;
}
tl.debug("Is the package an msdeploy package : " + isParamFilePresent);
return isParamFilePresent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment