Add CI-only archive task

This commit is contained in:
Starbeamrainbowlabs 2019-03-30 12:48:58 +00:00
parent c4f0533af4
commit 13567a9cb5
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

8
build
View file

@ -58,6 +58,7 @@ if [[ "$#" -lt 1 ]]; then
echo -e " ${CACTION}client-watch${RS} - Watch for changes to the client code & rebuild automatically"; echo -e " ${CACTION}client-watch${RS} - Watch for changes to the client code & rebuild automatically";
echo -e " ${CACTION}docs${RS} - Render the documentation"; echo -e " ${CACTION}docs${RS} - Render the documentation";
echo -e " ${CACTION}ci${RS} - Perform CI tasks"; echo -e " ${CACTION}ci${RS} - Perform CI tasks";
echo -e " ${LC}${CACTION}archive${RS} - CI: Create release archive";
echo -e ""; echo -e "";
exit 1; exit 1;
@ -247,7 +248,12 @@ task_docs() {
# ██████ ██ # ██████ ██
task_ci() { task_ci() {
tasks_run setup setup-dev tasks_run setup setup-dev
NODE_ENV="production" tasks_run client docs; NODE_ENV="production" tasks_run client docs archive;
}
task_archive() {
# We include the data directory here because we assume that this task is ONLY run in a CI environment, so it should only contain the default setup generated by an earlier task.
tar -cafv "${ARCHIVE}/Air-Quality-Web.tar.gz" app/ __nightdocs/ lib/ logic/ vendor/ data/ *.php *.md LICENSE version settings.default.toml
} }