Skip to content

Comparing Artifacts

Mike Burati edited this page Jul 20, 2018 · 2 revisions

The wchtools compare command can be used to compare artifacts between a local working directory and a WCH tenant, or between two local working directories, or between two WCH tenants.

The compare command is useful in its ability to generate manifests which list all of the artifacts that differ between the source and target of the compare operation. These manifest files can then be used as input to other wchtools commands, for example, push, pull, delete to perform actions against a target WCH tenant and only target a subset of the artifacts.

A useful scenario might be a developer working on a WCH site and making updates to web assets. After making some changes and getting his development environment working as he desires, he could then use the compare command to determine what is different between his working copy and the published copy in WCH.

For example:

wchtools compare -w --source <local_dir> --target <WCH API URL> --write-manifest my_changes

This will generate a new manifest file called my_changes with the set of web assets that are different between the supplied source working directory and the target Watson Content Hub environment.

The developer can then use this manifest to push his changes into the WCH environment. For example:

wchtools push --dir <local_dir> --url <WCH API URL> --manifest my_changes

The push command will only operate on those artifacts that are listed in the my_changes manifest and only push those changed artifacts into Watson Content Hub.

Clone this wiki locally