{"id":32181250,"url":"https://github.com/applied-science/deps-library","last_synced_at":"2025-12-12T01:07:10.922Z","repository":{"id":50801210,"uuid":"243005819","full_name":"applied-science/deps-library","owner":"applied-science","description":"Publish deps.edn libraries to Clojars","archived":false,"fork":false,"pushed_at":"2021-05-29T00:29:52.000Z","size":40,"stargazers_count":53,"open_issues_count":11,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-21T22:39:15.197Z","etag":null,"topics":["clojars","clojure","tools-deps"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/applied-science.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-25T13:26:05.000Z","updated_at":"2025-10-06T18:38:56.000Z","dependencies_parsed_at":"2022-09-26T22:30:31.922Z","dependency_job_id":null,"html_url":"https://github.com/applied-science/deps-library","commit_stats":null,"previous_names":["mhuebert/deps-library","appliedsciencestudio/deps-library"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/applied-science/deps-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applied-science%2Fdeps-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applied-science%2Fdeps-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applied-science%2Fdeps-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applied-science%2Fdeps-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/applied-science","download_url":"https://codeload.github.com/applied-science/deps-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applied-science%2Fdeps-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280348047,"owners_count":26315367,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["clojars","clojure","tools-deps"],"created_at":"2025-10-21T22:39:19.928Z","updated_at":"2025-10-21T22:39:20.952Z","avatar_url":"https://github.com/applied-science.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deps-library\n\n![Version Badge](https://img.shields.io/clojars/v/applied-science/deps-library)\n\nTo publish a small Clojure library to Clojars should be a simple thing.\n\n----\n\nAs a library author, my needs are simple:\n\n1. Bump the version when ready for a release\n2. Ship the code to Clojars\n\nWith `deps-library` this is possible using just one small config file. From that we\ncreate a `pom.xml` (using [garamond](https://github.com/workframers/garamond))\nand thin jar (using [depstar](https://github.com/seancorfield/depstar)), and\ndeploy to clojars (using [deps-deploy](https://github.com/slipset/deps-deploy)).\n\nThis library is deployed using itself.\n\n## Usage\n\nCreate a `release.edn` file in your project root, eg:\n\n```clj\n{:group-id \"applied-science\"\n :artifact-id \"deps-library\"\n :scm-url \"https://github.com/applied-science/deps-library\"}\n```\n\nAdd a `:release` alias to your `deps.edn` as follows:\n\n```clj\n:aliases\n {:release\n  {:extra-deps {applied-science/deps-library {:mvn/version \"VERSION\"}}\n   :main-opts [\"-m\" \"applied-science.deps-library\"]}}\n```\n\nMake sure `CLOJARS_USERNAME` and `CLOJARS_PASSWORD` environment variables are set\n(unless you are passing in `--clojars-username` and `--clojars-password` directly).\nFor example, add the following to your `~/.bashrc` or `~/.zshrc` or equivalent:\n\n```sh\nexport CLOJARS_USERNAME=\"XYZ\"\nexport CLOJARS_PASSWORD=\"XYZ\"\n```\n\nCreate an initial version tag (if you haven't already)\n\n```sh\ngit tag v0.1.0\n```\n\nRelease a new version (tag + pom + jar + deploy):\n\n```sh\nclj -A:release --patch # patch, minor, or major\n```\n\nThat's it.\n\nTo release the current version (pom + jar + deploy):\n\n```sh\nclj -A:release\n```\n\nTo just tag a new version:\n\n```sh\nclj -A:release tag --patch # patch, minor, or major\n```\n\n## Rationale\n\n[tools.deps](https://github.com/clojure/tools.deps.alpha) brought \"git deps\" to Clojure, making it\neasy to consume small libraries without any extra effort. However, for production code we often want\nto depend only on pinned versions that are stored on reliable, public, immutable repositories like\nClojars rather than rely on GitHub repositories, which are more easily moved/deleted.\n\nThere are four distinct steps in the release process (tag, pom, jar, deploy). In isolation, each step\nis already adequately covered by a number of different tools. However, tying them all together is\nenough of a pain (~one page of code, understanding \u0026 configuring each tool) that it discourages versioned\nreleases of small libraries. `deps-library` should make the process relatively painless.\n\n## Versioning\n\nBy default (via [garamond](https://github.com/workframers/garamond)), versions are managed\nvia git tags and are not stored in source code. This means we can release new versions without making any\nextra commits to update version numbers. Versions created this way can be easily browsed on GitHub\n(be sure to push with `--follow-tags`) and major CI services are easily configured to run workflows triggered\nby tagged commits.\n\nAlternatively, you can pass a `--version` argument at the command line, or add a `:version` to your\n`release.edn` file (in which case you must handle incrementing the version yourself).\n\n## CLI\n\n### Commands\n\neg. `clj -A:release \u003ccommand\u003e \u003c...options\u003e`\n\nCore flow:\n\n- _default_ (no command) runs tag + pom + jar + deploy\n- **tag** - creates git tag. if an increment is specified, increments the version first.\n- **pom** - creates pom.xml file\n- **jar** - creates thin jar\n- **deploy** - deploys to clojars\n\nOther commands:\n\n- **install** - install version to local maven repo (runs tag + pom + jar)\n- **version** - prints version according to given options/environment\n\n### Options\n\nThe `release.edn` file itself is optional - all config can be also be passed in via the command line:\n\n```\n  -v, --version VERSION                                          Specify a fixed version\n  -i, --incr INCREMENT                                           Increment the current version\n      --skip-tag                                                 Do not create a git tag for this version\n      --prefix PREFIX                      v                     Version prefix for git tag\n      --patch                                                    Increment patch version\n      --minor                                                    Increment minor version\n      --major                                                    Increment major version\n      --config CONFIG                      release.edn           Path to EDN options file\n      --group-id GROUP-ID\n      --artifact-id ARTIFACT-ID\n      --scm-url SCM-URL                                          The source control management URL (eg. github url)\n      --clojars-username CLOJARS-USERNAME  environment variable  Your Clojars username\n      --clojars-password CLOJARS-PASSWORD  environment variable  Your Clojars password\n      --dry-run                                                  Print expected actions, avoiding any side effects\n  -h, --help                                                     Print CLI options\n\n```\n\nAll command-line args are also valid keys for inclusion in `release.edn` (except `--config` for obvious reasons).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplied-science%2Fdeps-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapplied-science%2Fdeps-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplied-science%2Fdeps-library/lists"}