Skip to content

Commit

Permalink
update ci, clean build/
Browse files Browse the repository at this point in the history
  • Loading branch information
mli committed Dec 30, 2018
1 parent b70c2db commit 6cbb173
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 460 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "build/mx-theme"]
path = build/mx-theme
url = https://github.com/mli/mx-theme
[submodule "build/utils"]
path = build/utils
url = https://github.com/d2l-ai/utils
19 changes: 10 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ stage("Build and Publish") {
node {
ws('workspace/d2l-zh') {
checkout scm
sh "build/build_all.sh"
sh """#!/bin/bash
set -e
if [[ ${env.BRANCH_NAME} == master ]]; then
build/upload.sh
fi
"""
}
sh "git submodule update --init"
sh "build/utils/clean_build.sh"
sh "conda env update -f build/env.yml"
sh "build/utils/build_html.sh zh"
sh "build/utils/build_pdf.sh zh"
sh "build/utils/build_pkg.sh zh"
if (env.BRANCH_NAME == 'master') {
sh "build/utils/publish_website.sh zh"
}
}
}
}

7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
all: html

build/%.ipynb: %.md build/env.yml build/md2ipynb.py $(wildcard gluonbook/*)
build/%.ipynb: %.md build/env.yml $(wildcard gluonbook/*)
@mkdir -p $(@D)
cd $(@D); python ../md2ipynb.py ../../$< ../../$@
cd $(@D); python ../utils/md2ipynb.py ../../$< ../../$@

build/%.md: %.md
@mkdir -p $(@D)
Expand Down Expand Up @@ -62,10 +62,9 @@ pdf: $(DEPS) $(OBJ) $(PDFIMG)
sed -i /\\\\sphinxtablecontinued{Continued\ on\ next\ page}/d $(TEX)
sed -i /{\\\\tablename\\\\\ \\\\thetable{}\ --\ continued\ from\ previous\ page}/d $(TEX)
cd build/_build/latex && \
bash ../../convert_output_svg.sh && \
bash ../../utils/convert_output_svg.sh && \
buf_size=10000000 xelatex d2l-zh.tex && \
buf_size=10000000 xelatex d2l-zh.tex

clean:
rm -rf build/chapter* build/_build build/img build/data build/environment.yml build/README.md $(PKG)

70 changes: 0 additions & 70 deletions build/build_all.sh

This file was deleted.

5 changes: 0 additions & 5 deletions build/convert_output_svg.sh

This file was deleted.

77 changes: 0 additions & 77 deletions build/ipynb2mdd.sh

This file was deleted.

29 changes: 0 additions & 29 deletions build/lint.sh

This file was deleted.

78 changes: 0 additions & 78 deletions build/md2ipynb.py

This file was deleted.

41 changes: 0 additions & 41 deletions build/mdd_utils.py

This file was deleted.

Loading

0 comments on commit 6cbb173

Please sign in to comment.