Skip to content

Commit

Permalink
Add subsections to the CLI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Mar 10, 2022
1 parent c9228d2 commit 1a7ca16
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 25 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ MKDOCS_INDEX := site/index.html

.PHONY: docs
docs: mkdocs uml ## Generate documentation and UML
ifndef CI
@ eval "sleep 3; bin/open http://127.0.0.1:8000" &
poetry run mkdocs serve
endif

.PHONY: mkdocs
mkdocs: install $(MKDOCS_INDEX)
Expand Down Expand Up @@ -175,11 +179,6 @@ docs/demo.cast: Makefile
poetry run asciinema rec $@ --overwrite --command "make demo CI=true RECORDING_DELAY=1" --title "GitMan Demo"
poetry run asciinema upload $@

.PHONY: mkdocs-serve
mkdocs-serve: mkdocs
eval "sleep 3; bin/open http://127.0.0.1:8000" &
poetry run mkdocs serve

# BUILD #######################################################################

DIST_FILES := dist/*.tar.gz dist/*.whl
Expand Down
25 changes: 16 additions & 9 deletions docs/interfaces/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,23 @@ or limit the traversal of nested dependencies:
```sh
$ gitman install --depth=<count>
```
### Additional Options

It will leave untracked files alone. To delete them, run:
Install will only fetch from the repository if needed. To always fetch, run:

```sh
$ gitman install --clean
$ gitman install --fetch
```

It will only fetch from the repository if needed. To always fetch, run:
It will leave untracked files alone. To delete them, run:

```sh
$ gitman install --fetch
$ gitman install --clean
```

It will exit with an error if there are any uncommitted changes in dependencies or a post-install script fails. To overwrite all changes or ignore script failures, run:
### Handling Changes

Install will exit with an error if there are any uncommitted changes in dependencies or a post-install script fails. To overwrite all changes or ignore script failures, run:

```sh
$ gitman install --force
Expand Down Expand Up @@ -80,7 +83,9 @@ or limit the traversal of nested dependencies:
$ gitman update --depth=<count>
```

This will also record the exact versions of any previously locked dependencies. Disable this behavior by instead running:
### Additional Options

Update will also record the exact versions of any previously locked dependencies. Disable this behavior by instead running:

```sh
$ gitman update --skip-lock
Expand All @@ -92,7 +97,9 @@ or to additionally get the latest versions of all nested dependencies, run:
$ gitman update --all
```

It will exit with an error if there are any uncommitted changes in dependencies or a post-install script fails. To overwrite all changes or ignore script failures, run:
### Handling Changes

Update will exit with an error if there are any uncommitted changes in dependencies or a post-install script fails. To overwrite all changes or ignore script failures, run:

```sh
$ gitman update --force
Expand Down Expand Up @@ -150,13 +157,13 @@ $ gitman install

To lock a dependency to a specific version:

```
```sh
$ gitman lock <name1>@<sha_rev>
```

or to lock a source to latest revision of a specific tag or branch:

```
```sh
$ gitman lock <name1>@<git_tag_or_branch>
```

Expand Down
14 changes: 9 additions & 5 deletions docs/interfaces/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ from gitman.models import Source
source = Source("https://github.com/jacebrowning/gitman-demo")
```

or customize the source name and revision to get:
or customize the source name and revision:

```python
source = Source(
Expand All @@ -38,10 +38,14 @@ or overwrite changes, if necessary:
source.update_files(force=True)
```

## `Group`
## `Config`

*TBD*
You can also manipulate the configuration file programmatically:

## `Config`
```python
from gitman.models import load_config

*TBD*
config = load_config()

config.install_dependencies()
```
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdocs==1.2.3; python_version >= "3.6"
pygments==2.8.1; python_version >= "3.5"
pygments==2.11.2; python_version >= "3.5"
4 changes: 2 additions & 2 deletions docs/setup/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ then credential storage is not set up correctly.

To use the Keychain on macOS, run:

```
```sh
$ git config --global credential.helper osxkeychain
```

To use the Credential Manager on Windows run:

```
```sh
$ git config --global credential.helper wincred
```

Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a7ca16

Please sign in to comment.