Skip to content

docs: generate jaas cli reference#1792

Merged
kian99 merged 4 commits intocanonical:v3from
kian99:generate-jaas-cli-reference
Jan 7, 2026
Merged

docs: generate jaas cli reference#1792
kian99 merged 4 commits intocanonical:v3from
kian99:generate-jaas-cli-reference

Conversation

@kian99
Copy link
Contributor

@kian99 kian99 commented Jan 7, 2026

Description

This PR removes the publish-docs.yaml workflow that would publish a PR to the docs repo for the jaas CLI, in favor of a script that updates the docs locally.

Additionally we add a job to our ci.yaml workflow to verify that running make generate results in no diff.

Finally, the generated CLI reference doc has been changed from a .rst file to markdown to match our other doc files. The one downside is that the markdown generated documentation makes each command start with a h1 heading or # <heading> so there is no discernible way (at least to me) to add a separate heading to the doc. Trying to add a separate heading causes some issues with the contents bar that read-the-docs generates on the right hand side of the page.

Edit: I've also updated places where we were generating mocks with mockgen ... to go tool mockgen .... The latter was already used in some places but not others. It should make it simpler to run go generate ./... in CI.

Fixes JUJU-8983

@kian99 kian99 requested a review from a team as a code owner January 7, 2026 12:53
@kian99 kian99 requested a review from tmihoc January 7, 2026 12:53
Copy link
Member

@tmihoc tmihoc left a comment

Choose a reason for hiding this comment

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

LGTM, and thanks for fixing the .readthedocs.yaml issue too!

//go:generate mockgen -typed -destination=./mocks/jujucommands.go -package=mocks . JujuCommands
//go:generate mockgen -typed -destination=./mocks/jujuclientstore.go -package=mocks github.com/juju/juju/jujuclient ClientStore
//go:generate mockgen -typed -destination=./mocks/credentialstore.go -package=mocks . CredentialStore
//go:generate go tool mockgen -typed -destination=./mocks/store.go -package=mocks . Store
Copy link
Contributor

Choose a reason for hiding this comment

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

I hadn't realised tools.go was now obsolete, nice.

@kian99 kian99 merged commit 9c73c3b into canonical:v3 Jan 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants