1
0
Fork 0

Build Matrix Static source code

This commit is contained in:
Alex Kotov 2020-07-03 11:33:04 +05:00
parent b29eecd353
commit c937ac39f2
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 25 additions and 1 deletions

View file

@ -69,3 +69,27 @@
extra_opts:
- '--strip-components=1'
notify: Load, enable and restart Matrix Static
- name: Install Go package github.com/valyala/quicktemplate/qtc
become_user: '{{ matrix__static__user }}'
shell:
chdir: '{{ matrix__static__src_dir }}'
creates: '{{ matrix__static__opt_dir }}/go/bin/qtc'
cmd: 'GOPATH={{ matrix__static__opt_dir }}/go GOCACHE={{ matrix__static__opt_dir }}/go-cache go get github.com/valyala/quicktemplate/qtc'
notify: Load, enable and restart Matrix Static
- name: Run Go executable qtc
become_user: '{{ matrix__static__user }}'
shell:
chdir: '{{ matrix__static__src_dir }}'
creates: '{{ matrix__static__src_dir }}/templates/basepage.qtpl.go'
cmd: 'GOPATH={{ matrix__static__opt_dir }}/go GOCACHE={{ matrix__static__opt_dir }}/go-cache {{ matrix__static__opt_dir }}/go/bin/qtc'
notify: Load, enable and restart Matrix Static
- name: Build Matrix Static source code
become_user: '{{ matrix__static__user }}'
shell:
chdir: '{{ matrix__static__src_dir }}'
creates: '{{ matrix__static__bin_dir }}/matrix-static'
cmd: 'GOPATH={{ matrix__static__opt_dir }}/go GOCACHE={{ matrix__static__opt_dir }}/go-cache go build -o {{ matrix__static__bin_dir }} ./cmd/...'
notify: Load, enable and restart Matrix Static

View file

@ -12,7 +12,7 @@ StandatdError=syslog
SyslogIdentifier={{ matrix__static__service }}
Type=simple
User={{ matrix__static__user }}
WorkingDirectory={{ matrix__static__opt_dir }}
WorkingDirectory={{ matrix__static__src_dir }}
[Install]
WantedBy=multi-user.target