mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Simplify building from source
Do not package app, instead copy directly into expected directory
This commit is contained in:
		| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Fabian Koller
					Fabian Koller