Skip to content

Commit

Permalink
Expand on source keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Mar 26, 2022
1 parent d546e6c commit 789455c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
1 change: 1 addition & 0 deletions .pylint.ini
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ disable=
too-many-lines,
line-too-long,
too-many-locals,
too-many-statements,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
4 changes: 2 additions & 2 deletions gitman/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from . import __version__, commands, common, exceptions


def main(args=None, function=None): # pylint: disable=too-many-statements
def main(args=None, function=None):
"""Process command-line arguments and run the program."""

# Shared options
Expand Down Expand Up @@ -242,7 +242,7 @@ def main(args=None, function=None): # pylint: disable=too-many-statements
sys.exit(1)


def _get_command(function, namespace): # pylint: disable=too-many-statements
def _get_command(function, namespace):
args: List = []
kwargs: Dict = {}

Expand Down
31 changes: 31 additions & 0 deletions gitman/models/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,37 @@ class Source:
| `links` | Creates symlinks within a project | No | `[]` |
| `scripts` | Shell commands to run after checkout | No | `[]` |
### Params
Params are passed directly to the `clone` command to modify behavior such as:
```
# Shallow clone:
params: --depth=1
# Include submodules:
params: --recurse-submodules
```
### Sparse Paths
See [using sparse checkouts][using-sparse-checkouts] for more information.
### Links
See [using multiple links][using-multiple-links] for more information.
### Scripts
Scripts can be used to run post-checkout commands such us build steps. For example:
```
repo: "https://github.com/koalaman/shellcheck"
scripts:
- brew install cabal-install
- cabal install
```
"""

repo: str = ""
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edit_uri: https://github.com/jacebrowning/gitman/edit/main/docs
theme: readthedocs

plugins:
- autorefs
- mkdocstrings:
watch:
- gitman
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def it_does_not_modify_existing_config_file(config):
expect(config.datafile.text) == CONFIG


def describe_install(): # pylint: disable=too-many-statements
def describe_install():
def it_creates_missing_directories(config):
shell.rm(config.location)

Expand Down

0 comments on commit 789455c

Please sign in to comment.