just finished cbfmt
This commit is contained in:
@@ -1,13 +1,34 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Add buf
|
||||
- name: Set default buf values
|
||||
ansible.builtin.set_fact:
|
||||
buf:
|
||||
install_methods:
|
||||
- source
|
||||
build_deps:
|
||||
- go
|
||||
version: latest
|
||||
go_pkg: github.com/bufbuild/buf/cmd/buf
|
||||
- name: Configure bug install
|
||||
when:
|
||||
- buf_configured is undefined
|
||||
- "'buf' not in __configured"
|
||||
block:
|
||||
- name: Append buf to pkg_go
|
||||
- name: Set buf install method
|
||||
when:
|
||||
- buf_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + ['github.com/bufbuild/buf/cmd/buf@latest'] }}"
|
||||
buf_install_method: "{{ install_method if install_method in buf.install_methods else buf.install_methods[0] }}"
|
||||
|
||||
- name: Set buf_configured
|
||||
- name: Configure buf source install
|
||||
when:
|
||||
- buf_install_method == 'source'
|
||||
block:
|
||||
- name: Append buf to pkg_go
|
||||
ansible.builtin.set_fact:
|
||||
buf_go_install:
|
||||
bin: buf
|
||||
url: "{{ buf.go_pkg }}@{{ buf.version }}"
|
||||
|
||||
- name: Finalise buf configuration
|
||||
ansible.builtin.set_fact:
|
||||
buf_configured: true
|
||||
__configured: "{{ __configured | combine( { 'buf': buf_install_method } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user