Autoplanet: Quick configuration of PLaneT development links
Dave Gurnell and David Brooks
{dave, djb} at untyped
Autoplanet is a wrapper for planet/util that lets you write short scripts to configure PLaneT development links. These "autoplanet scripts" can be saved with application code to allow quick PlaneT cache reconfiguration when switching between different versions of your code.
Here is an example:
(require (planet untyped/autoplanet:1)) |
; Delete any existing development links: |
(remove-hard-links) |
; Install a published package from the PLaneT servers: |
(install-planet "untyped" "unlib.plt" 3 12) |
; Install an unpublished package in a local directory: |
(install-local "untyped" "mirrors.plt" 2 0 |
"~/untyped/opensource/unlib/trunk/src") |
; Install an old version of an unpublished package in SVN: |
(make-autoplanet-root) |
(install-svn "untyped" "smoke.plt" 1 0 |
"http://svn.untyped.com/smoke/trunk/src" 60) |
(require (planet untyped/autoplanet)) |
(install-planet owner package major minor) → void? |
owner : string? |
package : string? |
major : integer? |
minor : integer? |
A wrapper for download/install-pkg in planet/util. Downloads and installs the specified package using the standard PLaneT mechanisms.
(install-local owner package major minor path) → void? |
owner : string? |
package : string? |
major : integer? |
minor : integer? |
path : (U path? string?) |
Installs a development link for the specified package, located at path on the local filesystem. path must be absolute.
| ||||||||||||||||||||||||||||||||||||||||||
owner : string? | ||||||||||||||||||||||||||||||||||||||||||
package : string? | ||||||||||||||||||||||||||||||||||||||||||
major : integer? | ||||||||||||||||||||||||||||||||||||||||||
minor : integer? | ||||||||||||||||||||||||||||||||||||||||||
url : (U url? string?) | ||||||||||||||||||||||||||||||||||||||||||
revision : (U integer? 'head) = 'head |
Downloads the package in the Subversion repository at the specified url and revision, and installs a development link to it. The code is held locally in a subdirectory of the autoplanet-root directory. autoplanet-root must exist.
(autoplanet-root) → absolute-path? |
(autoplanet-root val) → void? |
val : absolute-path? |
The directory to use to stage SVN downloads.
(make-autoplanet-root) → void? |
Ensures the autoplanet-root directory exists. Raises an error if the path exists but is a file or a link.
(delete-autoplanet-root) → void? |
Deletes the autoplanet-root directory and all its contents. Does nothing if the path does not exist. Raises an error if the path exists and is a file or a link.
(remove-hard-links) → void? |
Deletes all development links. Does not delete the files that the development links were pointing to.