{"id":16014720,"url":"https://github.com/pmonks/pbr","last_synced_at":"2025-03-18T03:30:30.791Z","repository":{"id":40399300,"uuid":"414846747","full_name":"pmonks/pbr","owner":"pmonks","description":"Peter's Build Resources for Clojure tools.build projects.","archived":false,"fork":false,"pushed_at":"2024-04-13T01:39:36.000Z","size":2764,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2024-04-13T22:26:27.035Z","etag":null,"topics":["clojure","tools-build"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmonks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-08T04:34:52.000Z","updated_at":"2024-06-13T22:16:55.152Z","dependencies_parsed_at":"2024-01-02T03:29:19.999Z","dependency_job_id":"6a52288c-ae80-41d7-b9af-69e4b64f0f45","html_url":"https://github.com/pmonks/pbr","commit_stats":{"total_commits":241,"total_committers":1,"mean_commits":241.0,"dds":0.0,"last_synced_commit":"2820e710e6b17133615bf9c25883ff69336e5424"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fpbr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fpbr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fpbr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmonks%2Fpbr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmonks","download_url":"https://codeload.github.com/pmonks/pbr/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221704873,"owners_count":16866847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","tools-build"],"created_at":"2024-10-08T15:04:53.828Z","updated_at":"2025-03-18T03:30:30.779Z","avatar_url":"https://github.com/pmonks.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"| | | |\n|---:|:---:|:---:|\n| [**release**](https://github.com/pmonks/pbr/tree/release) | [![CI](https://github.com/pmonks/pbr/actions/workflows/ci.yml/badge.svg?branch=release)](https://github.com/pmonks/pbr/actions?query=workflow%3ACI+branch%3Arelease) | [![Dependencies](https://github.com/pmonks/pbr/actions/workflows/dependencies.yml/badge.svg?branch=release)](https://github.com/pmonks/pbr/actions?query=workflow%3Adependencies+branch%3Arelease) |\n| [**dev**](https://github.com/pmonks/pbr/tree/dev)  | [![CI](https://github.com/pmonks/pbr/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/pmonks/pbr/actions?query=workflow%3ACI+branch%3Adev) | [![Dependencies](https://github.com/pmonks/pbr/actions/workflows/dependencies.yml/badge.svg?branch=dev)](https://github.com/pmonks/pbr/actions?query=workflow%3Adependencies+branch%3Adev) |\n\n[![Latest Version](https://img.shields.io/clojars/v/com.github.pmonks/pbr)](https://clojars.org/com.github.pmonks/pbr/) [![License](https://img.shields.io/github/license/pmonks/pbr.svg)](https://github.com/pmonks/pbr/blob/release/LICENSE) [![Open Issues](https://img.shields.io/github/issues/pmonks/pbr.svg)](https://github.com/pmonks/pbr/issues)\n\n\n\u003cimg alt=\"Ice cold can of hangover-inducing rubbish beer\" align=\"right\" width=\"25%\" src=\"https://pabstblueribbon.com/wp-content/uploads/2020/10/pbr-org.png\"\u003e\n\n# PBR - Peter's Build Resources\n\nA little [tools.build](https://github.com/clojure/tools.build) task library and turnkey build script that supports the author's personal GitHub workflow.  It is not expected to be especially relevant for other developers' workflows, except perhaps as a model for how tools.build can be (somewhat) tamed when working with multiple independent projects that share common build tasks.\n\n## Why?\n\nBecause \"vanilla\" tools.build build scripts impose a _lot_ of unnecessary repetition when one is working on lots of separate projects that need to have the same set of build tasks. A more detailed explanation of the problem is [here](https://ask.clojure.org/index.php/11168/tools-build-are-standard-build-tasks-under-consideration).\n\n### Why not [clein](https://github.com/NoahTheDuke/clein) or [build.edn](https://github.com/liquidz/build.edn)?\n\nThese projects look very promising - I encourage folks to try them out and contribute to them!\n\n### Why not [build-clj](https://github.com/seancorfield/build-clj)?\n\n_Discontinued February 2023._\n\n## Features\n\n### Task library\n\nPBR includes a library of tools.build tasks that are [documented here](https://pmonks.github.io/pbr/).  These may be used independently of the turnkey build script described next.\n\n### Turnkey build script\n\nPBR also provides a turnkey `build.clj` script that provides all of the tasks I typically need in my build scripts.  It allows customisation via a per-project `pbr.clj` file, which must contain a `set-opts` fn where various project specific options can be set.  You can look at [PBR's own `pbr.clj` file](https://github.com/pmonks/pbr/blob/release/pbr.clj) for an idea of what this looks like.\n\nTasks can be listed by running `clojure -A:deps -T:build help/doc`, and include:\n\n* `check` - Check the code by AOT compiling it (and throwing away the result).  Uses [clj-check](https://github.com/athos/clj-check).\n* `check-release` - Check that a release can be done from the current directory.\n* `ci` - Run the CI pipeline.\n* `clean` - Clean up the project.\n* `deploy` - Deploys the library JAR to Clojars (using [deps-deploy](https://github.com/slipset/deps-deploy)).\n* `docs` - Generates documentation (using [codox](https://github.com/weavejester/codox)).\n* `eastwood` - Run the [eastwood](https://github.com/jonase/eastwood) linter.\n* `install` - Install the library locally e.g. so it can be tested by downstream dependencies\n* `jar` - Generates a library JAR for the project.\n* `kondo` - Run the [clj-kondo](https://github.com/clj-kondo/clj-kondo) linter.\n* `licenses` - Attempts to list all licenses for the transitive set of dependencies of the project, as SPDX license expressions, using [tools-licenses](https://github.com/pmonks/tools-licenses).\n* `lint` - Run all linters.\n* `nvd` - Run an NVD vulnerability check. NOTE: requires an API key from [here](https://nvd.nist.gov/developers/request-an-api-key).\n* `outdated` - Check for outdated dependencies, using [antq](https://github.com/liquidz/antq).\n* `pom` - Generates a comprehensive pom.xml for the project, using [tools-pom](https://github.com/pmonks/tools-pom)\n* `release` - Release a new version of the library.\n* `test` - Run the tests.\n* `uber` - Create an uber jar.\n* `uberexec` - Creates an executable uber jar. NOTE: does not bundle a JRE, though one is still required.\n* `upgrade` - Upgrade any outdated dependencies, using [antq](https://github.com/liquidz/antq). NOTE: does not prompt for confirmation!\n\n#### deps.edn required by turnkey build script\n\nTo use the turnkey build script, include the following alias in your project's `deps.edn`:\n\n```edn\n{:deps { ; Your project's dependencies\n       }\n :aliases {:build {:deps        {com.github.pmonks/pbr {:mvn/version \"RELEASE\"}}\n                   :ns-default  pbr.build}}}\n```\n\nThen, to run tasks, use:\n```shell\n$ clojure -T:build \u003ctask-name\u003e\n```\n\nA list of all available tasks can be obtained with:\n\n```shell\n$ clojure -A:deps -T:build help/doc\n```\n\nNote: you do not need to include the `pbr.build` namespace when referring to a task by name.\n\n\n#### Preparing to build with the turnkey build script\n\nTo prepare your project to use the turnkey build script, you must run the following command first:\n\n```shell\n$ clj -A:build -P\n```\n\n## FAQ\n\n[//]: # (Comment: Every Question in this list has two spaces at the end THAT MUST NOT BE REMOVED!!)\n\n**Q.** Why \"PBR\"?  \n**A.** Because this code is cheap and nasty, and will give you a headache if you consume too much of it.\n\n**Q.** Does PBR use itself for build tasks?  \n**A.** Yes it does!  [You can see this sneaky self-reference here](https://github.com/pmonks/pbr/blob/release/deps.edn#L42).\n\n## Contributor Information\n\n[Contributing Guidelines](https://github.com/pmonks/pbr/blob/release/.github/CONTRIBUTING.md)\n\n[Bug Tracker](https://github.com/pmonks/pbr/issues)\n\n[Code of Conduct](https://github.com/pmonks/pbr/blob/release/.github/CODE_OF_CONDUCT.md)\n\n### Developer Workflow\n\nThis project uses the [git-flow branching strategy](https://nvie.com/posts/a-successful-git-branching-model/), and the permanent branches are called `release` and `dev`.  Any changes to the `release` branch are considered a release and auto-deployed (JARs to Clojars, API docs to GitHub Pages, etc.).\n\nFor this reason, **all development must occur either in branch `dev`, or (preferably) in temporary branches off of `dev`.**  All PRs from forked repos must also be submitted against `dev`; the `release` branch is **only** updated from `dev` via PRs created by the core development team.  All other changes submitted to `release` will be rejected.\n\n### Build Tasks\n\n`pbr` uses [`tools.build`](https://clojure.org/guides/tools_build). You can get a list of available tasks by running:\n\n```\nclojure -A:deps -T:build help/doc\n```\n\nOf particular interest are:\n\n* `clojure -T:build test` - run the unit tests\n* `clojure -T:build lint` - run the linters (clj-kondo and eastwood)\n* `clojure -T:build ci` - run the full CI suite (check for outdated dependencies, run the unit tests, run the linters)\n* `clojure -T:build install` - build the JAR and install it locally (e.g. so you can test it with downstream code)\n\nPlease note that the `deploy` task is restricted to the core development team (and will not function if you run it yourself).\n\n## License\n\nCopyright © 2021 Peter Monks\n\nDistributed under the [Mozilla Public License, version 2.0](https://www.mozilla.org/en-US/MPL/2.0/).\n\nSPDX-License-Identifier: [`MPL-2.0`](https://spdx.org/licenses/MPL-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmonks%2Fpbr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmonks%2Fpbr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmonks%2Fpbr/lists"}