dw-utils(1) -- Demandware UtilitiesThis package provides a command line utility
dw-utilsfor managing code on Demandware sites.
--activate\ \] |
log\[level | (
upload-version) zip \[
--activate\ \] \[flags\
CommandsThe binary provides the following commands.
| Command | Description | | --------------------- | :---------------------------------------- | |
dw-utils activate version| Activate the codeversion
dw-utils clean [path]| Equivalant to a project clean in eclipse | |
dw-utils init| Interactively enter configuation options | |
dw-utils log [level]| Poll the log file for updates | |
dw-utils [upload | upload-version]| Upload a zipped code version to a sandbox | |
dw-utils watch| Watch cartridge path and upload changes |
CredentialsCredentials are stored in a file called
dw.jsonin the root of the project. dw-utils will create such a file if called with the
--saveoption, or interactively by calling
FlagsThe following flags are recognized
| Flag | Description | | ---- | :---------- | | -V, --version | Code version to upload to (defaults to 'version1') | | -H, --hostname | Hostname of remote DW server | | -u, --username | Username for WebDav (Same as Business Manager) | | -C, --cartridges | Path to Cartridges from project root (Default is 'cartridges') | | --save | Save settings for future use | | -a --activate | Activates the version after a
upload-version| | -S, --stability | Length of time the file's size should stay the same before uploading | | -f, --follow | Display only new changes for
tail -f| | -p, --prompt | Prompt for password | | -h, --help | Display help and usage details |
dw-utils activate version
This command activates the version passed on the command line. Note that it requires a version to be passed in. If you wish to activate the current version at the end of a
upload-version, that can be accomplished by means of the
-a | --activateflag
dw-utils clean [path]
This is Equivalant to a project clean that you would run in eclipse. It zips up all local files, and uploads them to the dw instance specified on the command line with
-H, or in
dw.jsonif it was previously set up. then all the old code in the apropriate version is deleted, and the zip file is unzipped. This ensures that the files on the remote are exactly the same as the ones on the client.
pathis the subdirectory of the
cartridgesdirectory you wish to upload.
dw-utils upload [version.zip]
This tool can also be invoked as
upload-versionwhich is longer but slightly more self-explanatory.
Upload a code version zip from another instance. In Business Manager, under Code Deployment click on the version you want to download, and click the Download link. This will download a zip file of the code for that version which can be uploaded using this tool.
Interactively enters configuration for the repository and stores it in
dw.json. Make sure to ignore this file in source controll.
Watch for changes to files in the
cartridgedirectory and upload them. This uploader will bulk upload files if there are more than 5 waiting to be uploaded, which results in very fast uploads even when there are a lot of changes.
NOTE: if you have stability issues or encounter a lot of errors, try upping the
dw-utils log [level]
levelspecifies the logging level, usually one of
[debug,warn,eror,fatal], but will work with any custom error logging as well. Upon startup, the command will automatically find the most recently updated log file with a name matching the
level. The log file is polled at the interval set with
-i --intervalwith a default of 5s.
--follow | -fto display only changes that happen after the logging starts.
NOTE: this will not show changes to log files created while
dw-utilswas running, so if the log file your are looking at rolls over to a new date, or if there is no log yet for the current day, it will not find it while running. You will have to exit out of the
dw-utils logand restart it to catch the new file.