Skip to content

chore: keep docs/admin/prometheus.md if make target fails #5284

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

Closed
wants to merge 3 commits into from
Closed
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
Next Next commit
chore: keep admin/prometheus.md if make target fails
  • Loading branch information
mtojek committed Dec 5, 2022
commit f1592fb9af21950ea8ec486b2dd7dc7bd5dfb80e
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,8 @@ site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find codersdk
docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
go run scripts/metricsdocgen/main.go
cd site
ifdef CI
yarn run format:check
else
yarn run format:write
endif
.PRECIOUS: docs/admin/prometheus.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use this for other tasks so I don't think we should use it here otherwise devs may commit unformatted docs. I think removing the format:check should be good enough.

Can you change the format:write to only do it on the single file as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, when make receives a signal to quit/kill, it should delete all target files, so in this case PRECIOUS seems to be reasonable.

I can try without the marker and see if it's sufficient. I can iterate on it if it isn't.


update-golden-files: cli/testdata/.gen-golden
.PHONY: update-golden-files
Expand Down