Liking cljdoc? Tell your friends :D

Contributing

PR Guidelines

  • Keep it small. Keep it obvious. Keep the docs updated.
  • README stays short. Deep material goes in doc/.
  • No new dependency unless it is actually used.
  • Prefer behavior-preserving changes. If behavior changes, say so in the commit.
  • Use fix: for fixes, not chore:. Keep commit messages lowercase and boring: fix:, feat:, docs:, refactor:, test:.
  • Pure helpers go in checks/, props/ or types/. Error-raising macro helpers stay in internals/defn_macro/.
  • Every new helper gets tests. Two focused test blocks are fine. Do not pad counts or assertions.
  • One PR = one idea. Do not mix docs, refactors and behavior changes unless they belong together.
  • Run lein test before opening a PR.
  • For focused work, use selectors: lein internals, lein checks, lein generator, lein operator, etc.
  • Run lein lint-fix and commit the formatting changes.
  • Open the PR against master and let CI pass. master is protected: changes land only through PRs with the CI checks green.
  • Do not change project.clj or CHANGELOG.md in a regular PR. Changelog entries are written when a version is cut.

CI/CD

GitHub Actions workflows live in .github/workflows/. CI checks PRs; CD checks master pushes and owns releasing. Both reuse the same check workflows.

WorkflowTriggerJobsPurpose
ci.ymlPR to masterlint, test, assertion, compile, build, guardChecks always run; guard validates PRs labeled bump only; never deploys
cd.ymlpush to master or manual dispatchlint, test, assertion, compile, build, mark, guard, deploy, releaseChecks first; mark finds the merged PR label; guard and deploy only run for labeled releases; manual force_release replays deploy for the current version and skips guard; release calls release.yml after deploy succeeds
guard.ymlreusablecheckValidates a labeled bump and outputs release and version
lint.ymlreusablecljfmt, drift, eastwoodlein lint-fix clean-tree check, drift guard and lein eastwood
test.ymlreusableunit, integration, performanceRun test suites separately
assertion.ymlreusableunit, integration, performanceRun each suite 10 times and fail on assertion-count drift as a determinism check, since generated/gen-related tests have been sensitive to non-determinism in the past
compile.ymlreusablecompilelein compile
build.ymlreusablejarlein pom and lein jar
deploy.ymlreusableclojarsDeploy GPG-signed artifacts to Clojars when version/tag is not already released; requires CLOJARS_USERNAME, CLOJARS_PASSWORD, GPG_PRIVATE_KEY, and GPG_PASSPHRASE secrets; outputs version
release.ymlreusablereleaseCreate a vX.Y.Z tag and GitHub Release from the bump commit; idempotent

Releases

One release covers any number of merged PRs. Versions are cut in a separate release PR that contains no code and changes only:

  • project.clj: the version on the first line, exactly one step above the previous version
  • CHANGELOG.md: a dated ## [X.Y.Z] section with change categories and entries, its link reference, and an updated [Unreleased] compare link
  • README.md: every version reference

Add the bump label to the release PR and squash-merge it into master. A bump: title is still a useful convention, but the label is what marks the release; squash-merge keeps the PR title as the master commit subject.

Which bump?

Recommended titleFrom 1.4.2Use when
bump: fix / bump: patch1.4.3Backwards-compatible bug fix or internal change
bump: minor1.5.0Backwards-compatible feature
bump: major2.0.0Incompatible API change or first stable release

Major version zero is unstable by SemVer: during 0.x, minor is commonly used for API changes too. guard.yml only requires the version to increase and the release metadata to be consistent; the choice of next version is yours.

ci.yml runs the checks on every PR to master, then calls guard.yml when the PR has the bump label. PR guard is validation only: PRs never deploy, and unlabeled PRs skip it without failing. cd.yml runs the checks again on master pushes, then mark looks up the merged PR label and calls guard.yml before deploying. A valid labeled bump publishes to Clojars; an invalid one fails CI/CD and publishes nothing. If deploy fails after a valid bump because of a transient infrastructure or publishing issue, replay cd.yml manually with force_release enabled to retry the current version without guard; this is for replays only, not for cutting new versions. Once the deploy job succeeds, cd.yml calls release.yml with the deployed version to create a vX.Y.Z tag and GitHub Release from the bump commit; the step is idempotent and skips when the release already exists. deploy.yml checks the tag and Clojars version before publishing.

Release artifacts are signed with GPG key fingerprint 10826822495E02A8E1273EC4546F51ABA7CC1BC5. Import doc/signing-key.asc and verify the detached signature shipped with each Clojars artifact, for example gpg --verify schemallic-X.Y.Z.jar.asc schemallic-X.Y.Z.jar.

Can you improve this documentation? These fine people already did:
imitelis & D.
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close