Skip to content

Commit

Permalink
feat: allow setting path of repoistory
Browse files Browse the repository at this point in the history
This will allow more fluid usage of commitsar as the user will be able to specify a specific repo path.

Closes #35
  • Loading branch information
fallion committed Oct 10, 2021
1 parent 1342636 commit d76466a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/content/usage/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ Adjust for version and distribution. Please check [Releases](https://github.com/
- tar -xzf commitsar_v0.0.2_Linux_x86_64.tar.gz
- ./commitsar
```

```sh
- curl -L -O https://github.com/aevea/commitsar/releases/download/v0.0.2/commitsar_v0.0.2_Linux_x86_64.tar.gz
- tar -xzf commitsar_v0.0.2_Linux_x86_64.tar.gz
- ./commitsar ./path-to-repo
```
8 changes: 6 additions & 2 deletions docs/content/usage/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ title: Docker
For running in docker just use the following command:

```sh
docker run --rm --name="commitsar" -w /src -v "$(pwd)":/src aevea/commitsar
docker run --rm --name="commitsar" -w /src -v "$(pwd)":/src aevea/commitsar
```

Make sure to load the working directory where `.git` folder is present. Commitsar will not work without the `.git` folder.
```sh
docker run --rm --name="commitsar" -w /src -v "$(pwd)":/src aevea/commitsar ./path-to-repo
```

Make sure to load the working directory where `.git` folder is present. Commitsar will not work without the `.git` folder. This can be overriden by setting the path argument.
13 changes: 12 additions & 1 deletion docs/content/usage/gobinaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: gobinaries
title: GoBinaries
---

Running using <https://gobinaries.com/>
Install commitsar on your machine using <https://gobinaries.com/>

```sh
curl -sf https://gobinaries.com/aevea/commitsar | sh
Expand All @@ -14,3 +14,14 @@ Or a specific version:
```sh
curl -sf https://gobinaries.com/aevea/commitsar[@VERSION] | sh
```

**To use:**

```sh
commitsar
```

Or with a path:
```sh
commitsar ./path-to-repo
```
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func runRoot(cmd *cobra.Command, args []string) error {

commitConfig.Path = "."

if len(args) > 0 {
commitConfig.Path = args[0]
}

return runner.Run(commitConfig, args...)
}

Expand Down

0 comments on commit d76466a

Please sign in to comment.