tokenbridge/deployment/roles/common/tasks/repo.yml

36 lines
964 B
YAML
Raw Permalink Normal View History

---
- name: Create archives of the monorepository
shell: |
(git ls-tree -r HEAD --name-only | sed '/^contracts$/d') | xargs tar zcfv monorepo.tar.gz --files-from -
cd contracts; (git ls-tree -r HEAD --name-only) | xargs tar zcfv ../contracts.tar.gz --files-from -
delegate_to: 127.0.0.1
become: false
args:
chdir: "{{ lookup('env', 'PWD') }}/.."
- name: Copy the archives
copy:
src: ../../../../{{ item }}
dest: "{{ bridge_path }}/"
2020-09-02 17:43:48 +03:00
mode: '0640'
with_items:
- monorepo.tar.gz
- contracts.tar.gz
- name: Untar the archives
shell: |
tar zxfv monorepo.tar.gz && rm monorepo.tar.gz
mkdir -p contracts && tar zxfv contracts.tar.gz -C ./contracts && rm contracts.tar.gz
args:
chdir: "{{ bridge_path }}"
- name: Remove local archives
shell: rm {{ item }}
delegate_to: 127.0.0.1
become: false
args:
chdir: "{{ lookup('env', 'PWD') }}/.."
with_items:
- monorepo.tar.gz
- contracts.tar.gz