Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit a874eb2

Browse files
committed
Fix: do not update library for static builds
1 parent 7b8f5b9 commit a874eb2

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

runestone/__main__.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,16 @@ def build(all, wd):
201201

202202
paver_main(args=myargs)
203203

204-
# Need a small config object with a dburl attribute just for update_library
205-
config = type("config", (object,), {})()
206-
config.dburl = get_dburl()
207-
course = ""
208-
if hasattr(pavement.options, "project_name"):
209-
course = pavement.options.project_name
210-
if not course:
211-
course = pavement.options.template_args["course_id"]
212-
update_library(config, "", course, click, build_system="Runestone")
204+
if pavement.options.build.template_args.get("dynamic_pages", False):
205+
# Need a small config object with a dburl attribute just for update_library
206+
config = type("config", (object,), {})()
207+
config.dburl = get_dburl()
208+
course = ""
209+
if hasattr(pavement.options, "project_name"):
210+
course = pavement.options.project_name
211+
if not course:
212+
course = pavement.options.template_args["course_id"]
213+
update_library(config, "", course, click, build_system="Runestone")
213214

214215

215216
@cli.command(short_help="preview the book in a minimal server (NO API support)")

0 commit comments

Comments
 (0)