Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update pre-commit and streamline openapi build process #39

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,7 @@ deploy-staging:
BUILD --pass-args core+deploy-staging

openapi:
FROM node:20-alpine
RUN apk update && apk add yq
RUN npm install -g openapi-merge-cli
FROM core+base-image
WORKDIR /src
COPY --dir openapi openapi
RUN openapi-merge-cli --config ./openapi/openapi-merge.json
RUN yq -oy ./openapi.json > openapi.yaml
SAVE ARTIFACT ./openapi.yaml AS LOCAL ./openapi.yaml

tidy:
FROM core+builder-image
COPY --pass-args (+sources/src) /src
WORKDIR /src
DO --pass-args core+GO_TIDY

release:
FROM core+builder-image
ARG mode=local
COPY --dir . /src
DO core+GORELEASER --mode=$mode
COPY openapi.yaml openapi.yaml
SAVE ARTIFACT ./openapi.yaml
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set dotenv-load
default:
@just --list

pre-commit: generate tidy lint
pre-commit: generate tidy lint openapi
pc: pre-commit

lint:
Expand Down
Loading