Closed YodaDaCoda closed 1 year ago
Thanks @YodaDaCoda , good catch!
Unfortunately I couldn't get the unit tests passing locally.
But maybe this can even be done without browser automation.
I implemented this in March 2019 https://github.com/amtrack/sfdx-browserforce-plugin/pull/122.
It looks like enableNetworksEnabled
is available since API v47.0 (Winter 20) CommunitiesSettings Metadata
settings/Communities.settings-meta.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<CommunitiesSettings xmlns="http://soap.sforce.com/2006/04/metadata">
<enableNetworksEnabled>true</enableNetworksEnabled>
</CommunitiesSettings>
sfdx force:source:deploy -p settings/Communities.settings-meta.xml
I just did this in a Scratch Org and it seemed to have worked. But I don't know if there are any side effects.
Could you please check?
Interesting, thanks. I'll give this a go later and report back.
Yep looks like this can be done via the matadata API - needs to be done before a deployment including sites/networks/experiences; activating can't be done in the same deploy.
Also includes a minor change to allow building the plugin on Windows