{"id":16697958,"url":"https://github.com/richfitz/drat.builder","last_synced_at":"2025-07-26T12:34:09.604Z","repository":{"id":32126322,"uuid":"35698904","full_name":"richfitz/drat.builder","owner":"richfitz","description":"Build tools for a drat","archived":false,"fork":false,"pushed_at":"2022-07-13T13:45:06.000Z","size":82,"stargazers_count":17,"open_issues_count":13,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T04:22:08.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richfitz.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":"2015-05-15T22:01:18.000Z","updated_at":"2024-12-28T19:58:55.000Z","dependencies_parsed_at":"2022-09-10T23:30:35.141Z","dependency_job_id":null,"html_url":"https://github.com/richfitz/drat.builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richfitz%2Fdrat.builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richfitz%2Fdrat.builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richfitz%2Fdrat.builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richfitz%2Fdrat.builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richfitz","download_url":"https://codeload.github.com/richfitz/drat.builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244855589,"owners_count":20521666,"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":[],"created_at":"2024-10-12T17:49:54.721Z","updated_at":"2025-03-21T19:32:23.152Z","avatar_url":"https://github.com/richfitz.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drat.builder\n\n[![Build Status](https://travis-ci.org/richfitz/drat.builder.png?branch=master)](https://travis-ci.org/richfitz/drat.builder)\n\n[![Docker Build Status](https://img.shields.io/docker/build/richfitz/drat.builder.svg)](https://hub.docker.com/r/richfitz/drat.builder)\n\n\nThe idea here is to make it extremely easy to keep a [drat](https://github.com/eddelbuettel/drat) repository up to date.\n\nSuppose you have a drat that tracks a number of upstream github repos (here the *repos* are the package repositories and *drat repository* will be the drat itself).  Say, [reomoji](https://github.com/richfitz/remoji), [rfiglet](https://github.com/richfitz/rfiglet) and [cowsay](https://github.com/sckott/cowsay)\n\nIn the root of an existing drat repository or in a new empty directory, make a file called `packages.txt` containing:\n\n```\nrichfitz/remoji\nrichfitz/rfiglet\nsckott/cowsay\n```\n\nThen run\n\n```r\ndrat.builder::build()\n```\n\nwhich will download the most recent sources for those packages, build them (source versions only, but will build vignettes) and add them to drat following the best practice commit log so that each log entry reads like\n\n```\n\u003cpackage_name\u003e \u003cversion\u003e \u003csha\u003e \u003curl\u003e\n```\n\ne.g.,\n\n```\nrfiglet 0.1.0 4b65d19 https://github.com/richfitz/rfiglet.git\n```\n\n## Command line use\n\nRun\n\n```\ndrat.builder::install_script(\"~/bin\")\n```\n\nand then a shell script `drat.builder` is available.  It takes all the arguments that `drat.builder::build` takes, but is useful to run from the command line.  See\n\n```\ndrat.builder --help\n```\n\nfor help.\n\n## Options\n\n`drat.builder` takes options\n\n* `install` -- installs packages before building so that vignettes can be built\n* `install_local` -- implies `install`, and installs locally and temporarily rather than into a system-readable library\n* `no_fetch` -- suppresses fetching packages\n\n## packages.txt\n\nThe file `packages.txt` roughly follows the convention started by devtools;\n\n* `username/repo/subdir` -- install package from a subdir\n* `username/repo@ref` -- install a particular reference\n* `username/repo/subdir@ref` -- both a subdir and a reference\n\nThe `@ref` syntax will be useful to anchor drat builds to particular versions, rather than constantly reading off `HEAD` of the upstream repo.  This will be easy when the upstream repo uses github releases and [semantic versioning](http://semver.org) as you can write:\n\n```\nrichfitz/rfiglet@v0.1.0\n```\n\n## Avoiding rebuilds\n\nTo avoid polluting the drat repo, `drat.builder` will try to avoid rebuilding.  To do this it keeps a file `packages.json` with version numbers and sha values of the installed packages.\n\n## TODO\n\n* support for non-github packages (e.g., using full URL)\n* support for preventing vignette build (e.g. long options to `R CMD build`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichfitz%2Fdrat.builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichfitz%2Fdrat.builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichfitz%2Fdrat.builder/lists"}