From 32ac21afd28274ff10c4eeb5667401ac8b6a4465 Mon Sep 17 00:00:00 2001 From: trev Date: Fri, 16 May 2025 18:35:48 -0400 Subject: [PATCH] fix: move buf to proto dir so submodules get the same deps --- .gitea/workflows/release.yaml | 9 ++++++++- README.md | 2 +- buf.gen.yaml | 3 +++ client/static/openapi/openapi.yaml | 4 ++-- buf.lock => proto/buf.lock | 0 buf.yaml => proto/buf.yaml | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) rename buf.lock => proto/buf.lock (100%) rename buf.yaml => proto/buf.yaml (90%) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index b06f811..edefdce 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -65,13 +65,20 @@ jobs: runs-on: ubuntu-latest needs: release # Wait for binary cache to propagate steps: + - name: Get domain + id: get_domain + run: | + DOMAIN=$(basename ${{ gitea.server_url }}) + echo $DOMAIN + echo "domain=$DOMAIN" >> $GITHUB_OUTPUT + - name: Docker meta id: meta uses: docker/metadata-action@v5 with: # list of Docker images to use as base name for tags images: | - ${{ gitea.server_url }}/${{ gitea.repository }} + ${{ steps.get_domain.outputs.domain }}/${{ gitea.repository }} # generate Docker tags based on the following events/attributes tags: | type=ref,event=branch diff --git a/README.md b/README.md index cff2101..e484f8a 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ It's that simple. If you're feeling fancy, install [direnv](https://direnv.net/) - `nix flake check`: runs all validations -- `buf lint` & `buf generate`: lints and generates code from protocol buffers +- `buf lint proto` & `buf generate`: lints and generates code from protocol buffers - `sqlc vet` & `sqlc generate`: verifies and generates code from SQL files diff --git a/buf.gen.yaml b/buf.gen.yaml index 96df3b2..54340f2 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,5 +1,8 @@ version: v2 clean: true +inputs: + - directory: proto + managed: enabled: true override: diff --git a/client/static/openapi/openapi.yaml b/client/static/openapi/openapi.yaml index 7be74f9..d3df9ec 100644 --- a/client/static/openapi/openapi.yaml +++ b/client/static/openapi/openapi.yaml @@ -3,8 +3,8 @@ servers: - url: /grpc info: title: Trevstack API - version: 1.0.0 - description: API for trevstack + version: 0.0.33 + description: API for Trevstack contact: name: Trev email: spam@trev.xyz diff --git a/buf.lock b/proto/buf.lock similarity index 100% rename from buf.lock rename to proto/buf.lock diff --git a/buf.yaml b/proto/buf.yaml similarity index 90% rename from buf.yaml rename to proto/buf.yaml index f98c828..cc6b883 100644 --- a/buf.yaml +++ b/proto/buf.yaml @@ -1,6 +1,6 @@ # For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml version: v2 modules: - - path: proto + - path: . deps: - buf.build/bufbuild/protovalidate