Skip to content

Commit b8f431f

Browse files
authored
Configure aqua to install protoc (#253)
1 parent 05d7fdf commit b8f431f

File tree

5 files changed

+112
-48
lines changed

5 files changed

+112
-48
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
prepare:
2+
curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.1.1/aqua-installer | bash
3+
@echo ''
4+
@echo 'Add $${AQUA_ROOT_DIR}/bin to the environment variable PATH.'
5+
@echo 'export PATH="$${AQUA_ROOT_DIR:-$${XDG_DATA_HOME:-$$HOME/.local/share}/aquaproj-aqua}/bin:$$PATH"'
6+
17
proto:
28
cd plugin/proto; \
39
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative tflint.proto

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ Please refer to [tflint-ruleset-template](https://github.com/terraform-linters/t
1919

2020
For more details on the API, see [tflint](https://pkg.go.dev/github.com/terraform-linters/tflint-plugin-sdk/tflint) and [helper](https://pkg.go.dev/github.com/terraform-linters/tflint-plugin-sdk/helper) packages on pkg.go.dev.
2121

22+
## Developing
23+
24+
The proto compiler is required when updating `.proto` files. The `protoc` and `protoc-gen-go` can be installed using [aqua](https://github.com/aquaproj/aqua).
25+
26+
```console
27+
$ make prepare
28+
curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.1.1/aqua-installer | bash
29+
===> Installing aqua v2.2.3 for bootstraping...
30+
31+
...
32+
33+
aqua version 2.3.7 (c07105b10ab825e7f309d2eb83278a0422a2b24f)
34+
35+
Add ${AQUA_ROOT_DIR}/bin to the environment variable PATH.
36+
export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"
37+
$ export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"
38+
$ aqua install
39+
$ make proto
40+
```
41+
2242
## Architecture
2343

2444
![architecture](architecture.png)

aqua.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# aqua - Declarative CLI Version Manager
3+
# https://aquaproj.github.io/
4+
# checksum:
5+
# enabled: true
6+
# require_checksum: true
7+
# supported_envs:
8+
# - all
9+
registries:
10+
- type: standard
11+
ref: v3.159.0 # renovate: depName=aquaproj/aqua-registry
12+
packages:
13+
- name: protocolbuffers/protobuf/protoc@v22.3
14+
- name: protocolbuffers/protobuf-go/protoc-gen-go@v1.30.0
15+
- name: grpc/grpc-go/protoc-gen-go-grpc@cmd/protoc-gen-go-grpc/v1.3.0

plugin/proto/tflint.pb.go

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)