Skip to content

Commit

Permalink
remove git-archive-all usage
Browse files Browse the repository at this point in the history
regular archive works as well and does not depend on GNU tar
  • Loading branch information
eins78 committed Jul 8, 2020
1 parent 278bf5a commit 7d5395d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 323 deletions.
303 changes: 0 additions & 303 deletions bin/git-archive-all

This file was deleted.

26 changes: 11 additions & 15 deletions roles/leihs-database-install/tasks/project.yml
@@ -1,36 +1,32 @@
- file:
path: '{{playbook_dir}}/tmp/database.tar.gz'
path: "{{playbook_dir}}/tmp/database.tar.gz"
state: absent
delegate_to: localhost
name: remove possibly exisiting archive

- shell: |
- name: create archive
shell: |
set -eux
DEPLOY_DIR='{{playbook_dir}}'
cd $DEPLOY_DIR/../database
$DEPLOY_DIR/bin/git-archive-all -v $DEPLOY_DIR/tmp/database.tar.gz
tar -cz --exclude-vcs --exclude-vcs-ignores --exclude "./spec" \
-f "{{playbook_dir}}/tmp/database.tar.gz" .
delegate_to: localhost
name: create archive

- file:
path: '{{leihs_database_path}}'
path: "{{leihs_database_path}}"
state: absent
name: remove existing {{leihs_database_path}}

- file:
path: '{{leihs_database_path}}'
path: "{{leihs_database_path}}"
state: directory
owner: '{{leihs_database_user}}'
owner: "{{leihs_database_user}}"
recurse: yes
name: create empty {{leihs_database_path}}

- file:
path: /tmp/database.tar.gz
state: absent
name: remove existing archive

- unarchive:
src: '{{playbook_dir}}/tmp/database.tar.gz'
dest: '{{leihs_database_path}}'
owner: '{{leihs_database_user}}'
src: "{{playbook_dir}}/tmp/database.tar.gz"
dest: "{{leihs_database_path}}"
owner: "{{leihs_database_user}}"
name: extract archive
13 changes: 8 additions & 5 deletions roles/leihs-legacy-install/tasks/install-project.yml
@@ -1,10 +1,13 @@
- file:
path: '{{playbook_dir}}/tmp/legacy.tar.gz'
path: "{{playbook_dir}}/tmp/legacy.tar.gz"
state: absent
delegate_to: localhost
name: remove possibly exisiting archive

- command: 'tar -cz -f "{{playbook_dir}}/tmp/legacy.tar.gz" -C "{{playbook_dir}}/../legacy" .'
- shell: |
cd "{{playbook_dir}}/../legacy"
tar -cz --exclude-vcs --exclude-vcs-ignores --exclude "./node_modules" --exclude "./tmp" --exclude "./spec" --exclude "./features" \
-f "{{playbook_dir}}/tmp/legacy.tar.gz" .
delegate_to: localhost
name: create archive

Expand All @@ -16,7 +19,7 @@
- file:
path: /leihs/legacy
state: directory
owner: '{{leihs_legacy_user}}'
owner: "{{leihs_legacy_user}}"
recurse: yes
name: create empty /leihs/legacy

Expand All @@ -26,9 +29,9 @@
name: remove existing archive

- unarchive:
src: '{{playbook_dir}}/tmp/legacy.tar.gz'
src: "{{playbook_dir}}/tmp/legacy.tar.gz"
dest: /leihs/legacy
owner: '{{leihs_legacy_user}}'
owner: "{{leihs_legacy_user}}"
name: extract archive

- name: set LEIHS_MOBILE_APP_ENABLED feature toggle
Expand Down

0 comments on commit 7d5395d

Please sign in to comment.