Skip to content

Commit 7328caa

Browse files
Use git archive instead of zip
1 parent 82348ef commit 7328caa

File tree

4 files changed

+9
-34
lines changed

4 files changed

+9
-34
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ config_local.yaml
77
temp
88
html
99
*.zip
10-
notebooks/_build
10+
_build
11+
apidocs
1112

1213
# Byte-compiled / optimized / DLL files
1314
__pycache__/

.zipignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
title: Machine Learning Control Training
55
author: appliedAI TransferLab
6-
copyright: '2023'
7-
exclude_patterns: [".github", ".venv", "**.ipynb_checkpoints", "_config.yml", "_toc.yml"]
6+
copyright: "2023"
7+
exclude_patterns: [".github", ".venv", "**__pycache__", "**.ipynb_checkpoints", "_config.yml", "_toc.yml"]
88
# Auto-exclude files not in the toc
99
only_build_toc_files: true
1010

build_scripts/prepare_zip_package.sh

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,17 @@ BUILD_DIR=$(dirname "$0")
4444

4545
echo "Validating build prerequisites..."
4646

47-
if grep "PARTICIPANT_BUCKET_READ_SECRET" config.yml ; then
48-
echo "You must replace the secret in config.yml with the actual secret, not
49-
a reference to an environment variable. Use the value of the env var there instead, just be careful not to commit it!"
50-
exit 255
51-
fi
52-
echo "Done"
53-
5447
check_notebooks_for_non_executed_load
5548

5649
echo "Building exercise notebooks with jupyter-book..."
57-
jupyter-book build notebooks
50+
bash build_scripts/build_docs.sh
5851
echo "Done"
5952

6053
echo "Done. Building the zip package..."
6154

62-
echo "Adding source files to thesan_output.zip"
63-
zip -r thesan_output.zip ./* -x@.zipignore
64-
cd notebooks/_build
65-
echo "Adding documentation in html to thesan_output.zip"
66-
zip -ur ../../thesan_output.zip html
55+
echo "Adding source files to training_ml_control_content.zip"
56+
git archive --output=./training_ml_control_content.zip --format=zip HEAD
57+
echo "Adding documentation in html to training_ml_control_content.zip"
58+
zip -ur training_ml_control_content.zip _build/html
6759
echo "Done"
6860
)

0 commit comments

Comments
 (0)