Build Matrix Static source code
This commit is contained in:
parent
b29eecd353
commit
c937ac39f2
2 changed files with 25 additions and 1 deletions
|
@ -69,3 +69,27 @@
|
||||||
extra_opts:
|
extra_opts:
|
||||||
- '--strip-components=1'
|
- '--strip-components=1'
|
||||||
notify: Load, enable and restart Matrix Static
|
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
|
||||||
|
|
|
@ -12,7 +12,7 @@ StandatdError=syslog
|
||||||
SyslogIdentifier={{ matrix__static__service }}
|
SyslogIdentifier={{ matrix__static__service }}
|
||||||
Type=simple
|
Type=simple
|
||||||
User={{ matrix__static__user }}
|
User={{ matrix__static__user }}
|
||||||
WorkingDirectory={{ matrix__static__opt_dir }}
|
WorkingDirectory={{ matrix__static__src_dir }}
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Reference in a new issue