Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Simplify building from source

Fabian Kollerbe2013975c17
diff --git a/ansible/tasks/install-source.yml b/ansible/tasks/install-source.yml
index 04a2991b9..64fbc525b 100644
--- a/ansible/tasks/install-source.yml
+++ b/ansible/tasks/install-source.yml
@@ -30,25 +30,19 @@
- npm install
- ./node_modules/.bin/ng build --prod
-- name: clean output directory
- file:
- path: "{{ gitdir.path }}/dist"
- state: absent
-
- name: create output directories
file:
path: "{{ item }}"
state: directory
with_items:
- - "{{ gitdir.path }}/dist"
- - "{{ gitdir.path }}/dist/paperless-ng"
- - "{{ gitdir.path }}/dist/paperless-ng/scripts"
+ - "{{ tempdir.path }}/paperless-ng"
+ - "{{ tempdir.path }}/paperless-ng/scripts"
- name: copy application into place
copy:
src: "{{ gitdir.path }}/{{ item.src }}"
remote_src: yes
- dest: "{{ gitdir.path }}/dist/paperless-ng/{{ item.dest | default('') }}"
+ dest: "{{ tempdir.path }}/paperless-ng/{{ item.dest | default('') }}"
with_items:
- src: CONTRIBUTING.md
- src: LICENSE
@@ -71,13 +65,13 @@
copy:
src: "{{ item.path }}"
remote_src: yes
- dest: "{{ gitdir.path }}/dist/paperless-ng/scripts/"
+ dest: "{{ tempdir.path }}/paperless-ng/scripts/"
with_items:
- "{{ glob.files }}"
- name: copy sources
command:
- cmd: "cp -r src/ dist/paperless-ng/src"
+ cmd: "cp -r src/ {{ tempdir.path }}/paperless-ng/src"
args:
chdir: "{{ gitdir.path }}"
@@ -90,29 +84,17 @@
- name: compile messages
command: "{{ gitdir.path }}/.venv/bin/python3 manage.py compilemessages"
args:
- chdir: "{{ gitdir.path }}/dist/paperless-ng/src/"
+ chdir: "{{ tempdir.path }}/paperless-ng/src/"
- name: collect static files
command: "{{ gitdir.path }}/.venv/bin/python3 manage.py collectstatic --no-input"
args:
- chdir: "{{ gitdir.path }}/dist/paperless-ng/src/"
+ chdir: "{{ tempdir.path }}/paperless-ng/src/"
- name: remove pycache directories
shell: find . -name __pycache__ | xargs rm -r
args:
- chdir: "{{ gitdir.path }}/dist/"
-
-- name: package app
- archive:
- path: "{{ gitdir.path }}/dist/"
- dest: "{{ gitdir.path }}/paperless-ng-{{ paperlessng_commit }}.tar.xz"
- format: xz
-
-- name: extract paperless-ng
- unarchive:
- src: "{{ gitdir.path }}/paperless-ng-{{ paperlessng_commit }}.tar.xz"
- remote_src: yes
- dest: "{{ tempdir.path }}"
+ chdir: "{{ tempdir.path }}"
- name: remove temporary git directory
file: