Skip to content
Snippets Groups Projects
Verified Commit 281d126a authored by Jonas Gröger's avatar Jonas Gröger :palm_tree:
Browse files

chore(build): no need for global redocly install

using npx, we can run all redocly commands without doing a global
install of redocly/cli (-g flag).

I also noticed we were using `latest` which outside of dev tests
is not recommended.

Some shorthand flags were also migrated to the long ones (--output).
parent 1e5aa20e
No related branches found
No related tags found
1 merge request!181Fix API build warnings (and then some)
.DEFAULT_GOAL := validate-build
.PHONY: install bundle validate validate-build bundle-dereferenced spectral
.PHONY: bundle validate validate-build bundle-dereferenced spectral
install:
npm i -g @redocly/cli@latest
pwd := $(shell pwd)
bundle: backup
redocly bundle \
spec/submission-api.yaml \
-o dist/submission-api.yaml
npx @redocly/cli@^1.9.0 bundle \
--output dist/submission-api.yaml spec/submission-api.yaml
validate:
redocly lint --extends=minimal spec/submission-api.yaml
npx @redocly/cli@^1.9.0 lint \
--extends=minimal spec/submission-api.yaml
validate-build: bundle
redocly lint --extends=minimal dist/submission-api.yaml
npx @redocly/cli@^1.9.0 lint \
--extends=minimal dist/submission-api.yaml
bundle-dereferenced: backup
redocly bundle \
--dereferenced \
spec/submission-api.yaml \
-o dist/submission-api.yaml
npx @redocly/cli@^1.9.0 bundle \
--dereferenced --output dist/submission-api.yaml spec/submission-api.yaml
backup:
if [ -f dist/submission-api.yaml ]; then cp dist/submission-api.yaml dist/submission-api-before.yaml; fi
pwd := $(shell pwd)
spectral: bundle
docker run --rm --pull=always \
-v "$(pwd):/work" -w /work \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment