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
* Initial work to preserve identifier fields
* Fixing test case
* Enabling more preservation if identifier field is updated
* Adding e2e test for preservation of identifier fields
* Adding e2e test for preservation of identifier fields
* Adding one more test case for custom domains
* Adding last test case
* Rerecording tests
* Simplifying change, updating comments
* Removing extraneous comment
---------
Co-authored-by: Will Vedder <[email protected]>
// Two address possibilities are provided to account for cases when there is a keyword
242
+
// in the resources's identifier field. When the resource identifier's field is preserved
243
+
// on the remote assets tree, it loses its identify, so we'll need to try two addresses:
244
+
// one where the identifier field has a keyword and one where the identifier field has
245
+
// the literal replaced value.
246
+
// Example: `customDomains.[domain=##DOMAIN].domain` and `customDomains.[domain=travel0.com].domain`
247
+
updatedRemoteAssets=updateAssetsByAddress(
248
+
updatedRemoteAssets,
249
+
address,//Two possible addresses need to be passed, one with identifier field keyword replaced and one where it is not replaced. Ex: `customDomains.[domain=##DOMAIN].domain` and `customDomains.[domain=travel0.com].domain`
250
+
localValue
251
+
);
252
+
updatedRemoteAssets=updateAssetsByAddress(
253
+
updatedRemoteAssets,
254
+
remoteAssetsAddress,//Two possible addresses need to be passed, one with identifier field keyword replaced and one where it is not replaced. Ex: `customDomains.[domain=##DOMAIN].domain` and `customDomains.[domain=travel0.com].domain`
copySync(`${__dirname}/testdata/should-preserve-keywords/directory`,workDirectory);//It is necessary to copy directory contents to work directory to prevent overwriting of Git-committed files
0 commit comments