mirror of https://github.com/buildinspace/peru.git
README update
Summary: Replace use of `build` with the new `unpack` field, and clean up the type section. Reviewers: sean Reviewed By: sean Differential Revision: https://phabricator.buildinspace.com/D155
This commit is contained in:
parent
927d46d296
commit
73cea6fd80
48
README.md
48
README.md
|
@ -105,9 +105,9 @@ git module dircolors:
|
||||||
|
|
||||||
curl module pathogen:
|
curl module pathogen:
|
||||||
url: https://codeload.github.com/tpope/vim-pathogen/tar.gz/v2.3
|
url: https://codeload.github.com/tpope/vim-pathogen/tar.gz/v2.3
|
||||||
# Run this command after fetching. In this case, it unpacks the archive.
|
# Untar the archive after fetching.
|
||||||
build: tar xfz vim-pathogen-2.3.tar.gz
|
unpack: tar
|
||||||
# After the build command, use this subdirectory as the root of the module.
|
# After the unpack, use this subdirectory as the root of the module.
|
||||||
export: vim-pathogen-2.3/autoload/
|
export: vim-pathogen-2.3/autoload/
|
||||||
|
|
||||||
git module vim-solarized:
|
git module vim-solarized:
|
||||||
|
@ -119,14 +119,14 @@ git module vim-solarized:
|
||||||
The contents of the `dircolors` module are copied to the root of our repo. The
|
The contents of the `dircolors` module are copied to the root of our repo. The
|
||||||
`files` field restricts this to just one file, `dircolors.ansi-dark`.
|
`files` field restricts this to just one file, `dircolors.ansi-dark`.
|
||||||
|
|
||||||
The `pathogen` module uses the `curl` type instead of `git`. (This is just for
|
The `pathogen` module uses the `curl` type instead of `git`, and its URL points
|
||||||
the sake of an example. In real life you'd probably want to use `git` here
|
to a tarball. (This is for the sake of an example. In real life you'd probably
|
||||||
too.) Since this `url` is a tarball, we use a `build` command to unpack it
|
use `git` here too.) The `unpack` field means that we get the contents of the
|
||||||
after it's fetched. The contents of the `pathogen` module are copied into
|
tarball rather than the tarball file itself. Because the module specifies an
|
||||||
`.vim/autoload`, and because the module specifies an `export` directory, it's
|
`export` directory, it's that directory rather than the whole module that gets
|
||||||
that directory rather than the whole module that gets copied. The result is
|
copied to the import path, `.vim/autoload`. The result is that Pathogen's
|
||||||
that Pathogen's `autoload` directory gets merged with our own, which is the
|
`autoload` directory gets merged with our own, which is the standard way to
|
||||||
standard way to install Pathogen.
|
install Pathogen.
|
||||||
|
|
||||||
The `vim-solarized` module gets copied into its own directory under `bundle`,
|
The `vim-solarized` module gets copied into its own directory under `bundle`,
|
||||||
which is where Pathogen will look for it. Note that it has an explicit `rev`
|
which is where Pathogen will look for it. Note that it has an explicit `rev`
|
||||||
|
@ -160,7 +160,7 @@ index 15c758d..7f0e26b 100644
|
||||||
|
|
||||||
curl module pathogen:
|
curl module pathogen:
|
||||||
url: https://codeload.github.com/tpope/vim-pathogen/tar.gz/v2.3
|
url: https://codeload.github.com/tpope/vim-pathogen/tar.gz/v2.3
|
||||||
build: tar xfz v2.3
|
unpack: tar
|
||||||
export: vim-pathogen-2.3/autoload/
|
export: vim-pathogen-2.3/autoload/
|
||||||
+ sha1: 9c3fd6d9891bfe2cd3ed3ddc9ffe5f3fccb72b6a
|
+ sha1: 9c3fd6d9891bfe2cd3ed3ddc9ffe5f3fccb72b6a
|
||||||
|
|
||||||
|
@ -206,12 +206,24 @@ up to date, and you'll still be able to reach old versions in your history.
|
||||||
modules without needing to push your changes upstream or edit `peru.yaml`.
|
modules without needing to push your changes upstream or edit `peru.yaml`.
|
||||||
|
|
||||||
## Module Types
|
## Module Types
|
||||||
- `git` `hg` `svn`
|
|
||||||
- fields: `url` `[rev]` `[reup]`
|
##### git, hg, svn
|
||||||
- `curl` - actually powered by Python's `urllib`
|
For cloning repos. These types all provide the same fields:
|
||||||
- fields: `url` `[filename]` `[sha1]`
|
- `url`: required, any protocol supported by the underlying VCS
|
||||||
- A few others mostly for testing purposes. See `rsync` for an example
|
- `rev`: optional, the specific revision/branch/tag to fetch
|
||||||
implemented in Bash.
|
- `reup`: optional, the branch/tag to get the latest rev from when running
|
||||||
|
`peru reup`
|
||||||
|
|
||||||
|
##### curl
|
||||||
|
For downloading a file from a URL. This type is powered by Pythons's standard
|
||||||
|
library, rather than an external program.
|
||||||
|
- `url`: required, any kind supported by `urllib` (HTTP, FTP, `file://`)
|
||||||
|
- `filename`: optional, overrides the default filename
|
||||||
|
- `sha1`: optional, checks that the downloaded file matches the checksum
|
||||||
|
- `unpack`: optional, `tar` or `zip`
|
||||||
|
|
||||||
|
Peru includes a few other types mostly for testing purposes. See `rsync` for an
|
||||||
|
example implemented in Bash.
|
||||||
|
|
||||||
## Creating New Module Types
|
## Creating New Module Types
|
||||||
Module type plugins are as-dumb-as-possible scripts that only know how to
|
Module type plugins are as-dumb-as-possible scripts that only know how to
|
||||||
|
|
Loading…
Reference in New Issue