src.nth.io/

summaryrefslogtreecommitdiff
path: root/mattertimesync/build/tasks/main.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'mattertimesync/build/tasks/main.yaml')
-rw-r--r--mattertimesync/build/tasks/main.yaml14
1 files changed, 14 insertions, 0 deletions
diff --git a/mattertimesync/build/tasks/main.yaml b/mattertimesync/build/tasks/main.yaml
index e846f9c..c586e01 100644
--- a/mattertimesync/build/tasks/main.yaml
+++ b/mattertimesync/build/tasks/main.yaml
@@ -1,5 +1,14 @@
---
+- name: ensure build work dir exists
+ become: yes
+ file:
+ path: "{{build_work_dir}}"
+ state: "directory"
+ owner: "{{ansible_user}}"
+ group: "{{ansible_user}}"
+ mode: "0755"
+
- name: unarchive mattertimesync source
unarchive:
remote_src: yes
@@ -16,6 +25,9 @@
command: "npm ci"
args:
chdir: "{{mattertimesync_build_dir}}"
+ # Keep the npm cache on build_work_dir (the SSD) instead of the SD card.
+ environment:
+ npm_config_cache: "{{build_work_dir}}/.npm"
when: not build_file.stat.exists
- name: bundle mattertimesync
@@ -23,6 +35,8 @@
args:
chdir: "{{mattertimesync_build_dir}}"
creates: "{{mattertimesync_build_dir}}/mattertimesync.mjs"
+ environment:
+ npm_config_cache: "{{build_work_dir}}/.npm"
when: not build_file.stat.exists
- name: create build server dir