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 |     - npm install | ||||||
|     - ./node_modules/.bin/ng build --prod |     - ./node_modules/.bin/ng build --prod | ||||||
|  |  | ||||||
| - name: clean output directory |  | ||||||
|   file: |  | ||||||
|     path: "{{ gitdir.path }}/dist" |  | ||||||
|     state: absent |  | ||||||
|  |  | ||||||
| - name: create output directories | - name: create output directories | ||||||
|   file: |   file: | ||||||
|     path: "{{ item }}" |     path: "{{ item }}" | ||||||
|     state: directory |     state: directory | ||||||
|   with_items: |   with_items: | ||||||
|     - "{{ gitdir.path }}/dist" |     - "{{ tempdir.path }}/paperless-ng" | ||||||
|     - "{{ gitdir.path }}/dist/paperless-ng" |     - "{{ tempdir.path }}/paperless-ng/scripts" | ||||||
|     - "{{ gitdir.path }}/dist/paperless-ng/scripts" |  | ||||||
|  |  | ||||||
| - name: copy application into place | - name: copy application into place | ||||||
|   copy: |   copy: | ||||||
|     src: "{{ gitdir.path }}/{{ item.src }}" |     src: "{{ gitdir.path }}/{{ item.src }}" | ||||||
|     remote_src: yes |     remote_src: yes | ||||||
|     dest: "{{ gitdir.path }}/dist/paperless-ng/{{ item.dest | default('') }}" |     dest: "{{ tempdir.path }}/paperless-ng/{{ item.dest | default('') }}" | ||||||
|   with_items: |   with_items: | ||||||
|     - src: CONTRIBUTING.md |     - src: CONTRIBUTING.md | ||||||
|     - src: LICENSE |     - src: LICENSE | ||||||
| @@ -71,13 +65,13 @@ | |||||||
|   copy: |   copy: | ||||||
|     src: "{{ item.path }}" |     src: "{{ item.path }}" | ||||||
|     remote_src: yes |     remote_src: yes | ||||||
|     dest: "{{ gitdir.path }}/dist/paperless-ng/scripts/" |     dest: "{{ tempdir.path }}/paperless-ng/scripts/" | ||||||
|   with_items: |   with_items: | ||||||
|     - "{{ glob.files }}" |     - "{{ glob.files }}" | ||||||
|  |  | ||||||
| - name: copy sources | - name: copy sources | ||||||
|   command: |   command: | ||||||
|     cmd: "cp -r src/ dist/paperless-ng/src" |     cmd: "cp -r src/ {{ tempdir.path }}/paperless-ng/src" | ||||||
|   args: |   args: | ||||||
|     chdir: "{{ gitdir.path }}" |     chdir: "{{ gitdir.path }}" | ||||||
|  |  | ||||||
| @@ -90,29 +84,17 @@ | |||||||
| - name: compile messages | - name: compile messages | ||||||
|   command: "{{ gitdir.path }}/.venv/bin/python3 manage.py compilemessages" |   command: "{{ gitdir.path }}/.venv/bin/python3 manage.py compilemessages" | ||||||
|   args: |   args: | ||||||
|     chdir: "{{ gitdir.path }}/dist/paperless-ng/src/" |     chdir: "{{ tempdir.path }}/paperless-ng/src/" | ||||||
|  |  | ||||||
| - name: collect static files | - name: collect static files | ||||||
|   command: "{{ gitdir.path }}/.venv/bin/python3 manage.py collectstatic --no-input" |   command: "{{ gitdir.path }}/.venv/bin/python3 manage.py collectstatic --no-input" | ||||||
|   args: |   args: | ||||||
|     chdir: "{{ gitdir.path }}/dist/paperless-ng/src/" |     chdir: "{{ tempdir.path }}/paperless-ng/src/" | ||||||
|  |  | ||||||
| - name: remove pycache directories | - name: remove pycache directories | ||||||
|   shell: find . -name __pycache__ | xargs rm -r |   shell: find . -name __pycache__ | xargs rm -r | ||||||
|   args: |   args: | ||||||
|     chdir: "{{ gitdir.path }}/dist/" |     chdir: "{{ tempdir.path }}" | ||||||
|  |  | ||||||
| - 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 }}" |  | ||||||
|  |  | ||||||
| - name: remove temporary git directory | - name: remove temporary git directory | ||||||
|   file: |   file: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Fabian Koller
					Fabian Koller