You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sgd currently does not have any useful stdout and because of that we have to parse xml files to determine if our automations must continue or not. For example, we have to do something like shown below to determine if there are or not changes in the package.xml before we can schedule a deploy job in salesforce
local mdapi=$(xmllint --xpath "count(//*[local-name()='types' and namespace-uri()='http://soap.sforce.com/2006/04/metadata'])" dist/$orgAlias/package/package.xml)echo"Number of types is: $mdapi"if [ "$mdapi"!="0" ];then
// we can schedule a metadata deploy or validation job
fi
Describe a solution you propose
I believe that all automations run their next steps when:
package.xml has changes
destructiveChanges.xml has changes
when both files have changes
so maybe it would be nice to add the following information in the stdout of the command so that developers don't need to waste additional time parsing xml files
{
{
"status": 0,
"result": {
"has_package_changes": "true"// true when package/package.xml has changes"has_destructive_changes": "false"// true when destructiveChanges/destructiveChanges.xml has changes
}
}
Describe alternatives you've considered
I have to use an xml parser to count the number of <types> in the package.xml to decide the path my automations should follow.
Additional context
N/a
The text was updated successfully, but these errors were encountered:
Thanks for this enhancement request and thanks for contributing in making this project better!
I think we already had an issue related to that topic and here is how we proposed to deal with this situation.
That being said, I like the idea of having more information in case of success.
It would make easier to drive behavior of other tools relaying on sgd based on sgd result.
And the way have those information using json output of the command is nice, elegant and portable IMHO
So here is a spec based on the one you proposed (we can debate):
The output of the commands will have a new attributs info that will contain hasPackage boolean attribut and hasDestructive boolean attribut.
The info attribut will be filled only if success is true, else the info attribut will be empty object {}
The info.hasPackage attribut will be true if the package.xml generated contains member, else false
The info.hasDestructive attribut will be true if the destructiveChanges.xml generated contains member, else false
Is your proposal related to a problem?
sgd currently does not have any useful stdout and because of that we have to parse xml files to determine if our automations must continue or not. For example, we have to do something like shown below to determine if there are or not changes in the package.xml before we can schedule a deploy job in salesforce
Describe a solution you propose
I believe that all automations run their next steps when:
so maybe it would be nice to add the following information in the stdout of the command so that developers don't need to waste additional time parsing xml files
Describe alternatives you've considered
I have to use an xml parser to count the number of
<types>
in the package.xml to decide the path my automations should follow.Additional context
N/a
The text was updated successfully, but these errors were encountered: