Skip to content

Commit

Permalink
chore: update README with new example
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed May 30, 2021
1 parent 6b900e5 commit 6d7ad18
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ generate: install
echo 'foo@bar:~$$ repoman -h' > .tmp/usage.txt
repoman -h 2>> .tmp/usage.txt

for sub in maintenance doctor version template-post-clone; do \
for sub in maintenance doctor version template-post-clone info; do \
echo 'foo@bar:~$$ repoman '$$sub' -h' > .tmp/usage-$$sub.txt; \
repoman $$sub -h 2>> .tmp/usage-$$sub.txt; \
done

echo 'foo@bar:~$$ repoman info .' > .tmp/example-info.txt
repoman info . >> .tmp/example-info.txt

embedmd -w README.md
rm -rf .tmp
.PHONY: generate
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,37 @@

## Usage

[embedmd]:# (.tmp/example-info.txt console)
```console
foo@bar:~$ repoman info .
{
"Git": {
"CloneURL": "git@github.com:moul/repoman",
"CurrentBranch": "master",
"HTMLURL": "https://github.com/moul/repoman",
"InMainBranch": true,
"IsDirty": null,
"MainBranch": "master",
"Metadata": {
"GoModPath": "moul.io/repoman",
"HasBinary": true,
"HasDocker": true,
"HasGo": true,
"HasLibrary": false
},
"OriginRemotes": [
"git@github.com:moul/repoman"
],
"RepoName": "repoman",
"RepoOwner": "moul",
"Root": "/home/moul/go/src/moul.io/repoman"
},
"Path": "/home/moul/go/src/moul.io/repoman"
}
```

---

[embedmd]:# (.tmp/usage.txt console)
```console
foo@bar:~$ repoman -h
Expand Down Expand Up @@ -53,6 +84,13 @@ FLAGS
-std true standard maintenance tasks
```

[embedmd]:# (.tmp/usage-info.txt console)
```console
foo@bar:~$ repoman info -h
USAGE
info [opts] <path...>
```

[embedmd]:# (.tmp/usage-template-post-clone.txt console)
```console
foo@bar:~$ repoman template-post-clone -h
Expand Down

0 comments on commit 6d7ad18

Please sign in to comment.