Skip to content

Commit

Permalink
autobuild.sh: include webpage.py execution (greenelab#113)
Browse files Browse the repository at this point in the history
Most autobuild users will want to automatically update the webpage. See discussion at
manubot/rootstock#101 (comment)

Update README to better document autobuild.
  • Loading branch information
dhimmel authored Feb 17, 2018
1 parent 29cd993 commit b7a9de8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@ Then, you can build the manuscript on POSIX systems by running the following com
# Activate the manubot conda environment (assumes conda version >= 4.4)
conda activate manubot

# Build the manuscript
# Build the manuscript, saving outputs to the output directory
sh build/build.sh

# Or monitor the content directory, and automatically rebuild the manuscript
# when a change is detected.
sh build/autobuild.sh

# At this point, the HTML & PDF outputs will have been created. The remaining
# commands are for serving the webpage to view the HTML manuscript locally.

Expand All @@ -64,6 +60,13 @@ cd webpage
python -m http.server
```

Sometimes it's helpful to monitor the content directory and automatically rebuild the manuscript when a change is detected.
The following command, while running, will trigger both the `build.sh` and `webpage.py` scripts upon content changes:

```sh
sh build/autobuild.sh
```

### Continuous Integration

[![Build Status](https://travis-ci.org/greenelab/manubot-rootstock.svg?branch=master)](https://travis-ci.org/greenelab/manubot-rootstock)
Expand Down
4 changes: 2 additions & 2 deletions build/autobuild.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automatically rebuild manuscript when content changes
# Automatically rebuild mansucript outputs and the webpage when content changes
# Depends on watchdog https://github.com/gorakhargosh/watchdog
watchmedo shell-command \
--wait \
--command='sh build/build.sh' \
--command='sh build/build.sh && python build/webpage.py' \
content

0 comments on commit b7a9de8

Please sign in to comment.