Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,13 +1,49 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: buf
|
||||
## Description: A CLI tool for working with protocols buffers
|
||||
## Version: latest
|
||||
## Methods: source
|
||||
## Helpers: go_install
|
||||
---
|
||||
- name: Add buf
|
||||
- name: Set default buf values # {{{
|
||||
ansible.builtin.set_fact:
|
||||
buf:
|
||||
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_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + ['github.com/bufbuild/buf/cmd/buf@latest'] }}"
|
||||
buf_imethod: "{{ imethod if imethod in buf.methods else buf.methods[0] }}"
|
||||
|
||||
- name: Set buf_configured
|
||||
- name: Configure buf source install
|
||||
when:
|
||||
- buf_imethod == 'source'
|
||||
block:
|
||||
- name: Configure buf go install
|
||||
ansible.builtin.set_fact:
|
||||
buf_go_install:
|
||||
bin: buf
|
||||
url: "{{ buf.go_pkg }}@{{ buf.version }}"
|
||||
|
||||
- name: Append buf to pkg_go
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + [buf_go_install] }}"
|
||||
|
||||
- name: Finalise buf source install
|
||||
ansible.builtin.set_fact:
|
||||
buf_install: "{{ buf_imethod }}={{ buf_go_install }}"
|
||||
|
||||
- name: Finalise buf configuration
|
||||
ansible.builtin.set_fact:
|
||||
buf_configured: true
|
||||
__configured: "{{ __configured | combine( { 'buf': buf_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user