From 91f0ec739e6fbea5fb137f4553e043d9018376c0 Mon Sep 17 00:00:00 2001 From: Dryusdan Date: Wed, 3 Aug 2022 10:28:23 +0200 Subject: [PATCH] Use the new process to build web --- tasks/main.yml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 30ee43d..98ed5c5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -177,7 +177,20 @@ - upgrade - name: Init build - shell: "npm run sub:init" + shell: "npm ci" + args: + chdir: "{{ item.home }}/web-vault" + become: yes + become_user : "{{ item.name }}" + become_method: su + become_flags: '-s /bin/bash' + loop: "{{ bitwarden }}" + tags: + - install + - upgrade + +- name: Init build with fix + shell: "npm audit fix || true" args: chdir: "{{ item.home }}/web-vault" become: yes @@ -190,9 +203,22 @@ - upgrade - name: Install npm dependancies - shell: "npm install" + shell: "npm run dist:oss:selfhost" args: - chdir: "{{ item.home }}/web-vault" + chdir: "{{ item.home }}/web-vault/apps/web" + become: yes + become_user : "{{ item.name }}" + become_method: su + become_flags: '-s /bin/bash' + loop: "{{ bitwarden }}" + tags: + - install + - upgrade + +- name: Install npm dependancies + shell: "printf '{\"version":"%s\"}' $(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/dani-garcia/bw_web_builds.git 'v*' | tail -n1 | sed -E 's#.*?refs/tags/v##') > build/vw-version.json" + args: + chdir: "{{ item.home }}/web-vault/apps/web" become: yes become_user : "{{ item.name }}" become_method: su