34 lines
1.1 KiB
Racket
34 lines
1.1 KiB
Racket
#lang scribble/manual
|
|
|
|
@(require (for-label package-zipper
|
|
racket/base))
|
|
|
|
@title{Package Zipper}
|
|
@author{Hans Dijkema}
|
|
|
|
@defmodule[package-zipper]
|
|
|
|
@defproc[(zip-package [directory path-string? (current-directory)])
|
|
path?]{
|
|
|
|
Reads @filepath{info.rkt} in @racket[directory], obtains its
|
|
@racket['version] value, and creates a ZIP archive in the parent directory.
|
|
|
|
The output filename is formed from the package directory name and version. For
|
|
example, package directory @filepath{racket-upnp} with version @tt{5.0} produces
|
|
@filepath{racket-upnp-5.0.zip}.
|
|
|
|
The directory is archived recursively. The following paths are omitted:
|
|
|
|
@itemlist[
|
|
@item{@filepath{.git} directories and files}
|
|
@item{names ending in @tt{~}}
|
|
@item{names ending in @tt{.bak}, without regard to case}
|
|
@item{@tt{.html}, @tt{.js}, and @tt{.css} files below directories named
|
|
@filepath{scribblings} or @filepath{scribbles}, without regard to case}
|
|
]
|
|
|
|
The package files are stored at the root of the archive. An existing archive
|
|
with the same name is replaced. The resulting complete path is returned.
|
|
}
|