Skip to content

Commit

Permalink
update install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Feb 18, 2021
1 parent 7e2c54f commit 3b83bad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
33 changes: 11 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ Automatically create commit history, release notes, and a changelog.

## Install

## Local
### Executable

```bash
git clone https://github.com/ktmeaton/autologs
export PATH=`pwd`/autologs:$PATH
which autologs
# Download executable
curl https://raw.githubusercontent.com/ktmeaton/autologs/main/autologs -o autologs

# Add to path
sudo mv autologs /usr/local/bin/

autologs --help
```

Expand All @@ -30,11 +33,10 @@ List parameters autologs will use:
```bash
$ autologs

Creating Auto ListParams with the following parameters.
Repository: ktmeaton/autologs
Commit URL: https://github.com/ktmeaton/autologs/commit
Old version: a4c28c5
New version: HEAD
Old tag: a4c28c5
New tag: HEAD
Max Commits: 20
Notes Directory: docs/notes
Output File: /dev/stdout
Expand All @@ -44,13 +46,11 @@ Creating Auto ListParams with the following parameters.
### Commit History

```bash
$ autologs --commits --max-commits 5
$ autologs --commits --max-commits 3

* [```1f05f16```](https://github.com/ktmeaton/autologs/commit/1f05f16) proper writing to output file
* [```f8c3eed```](https://github.com/ktmeaton/autologs/commit/f8c3eed) bugfix in repo PR url
* [```0915673```](https://github.com/ktmeaton/autologs/commit/0915673) Merge pull request #1 from ktmeaton/dev
* [```369d26b```](https://github.com/ktmeaton/autologs/commit/369d26b) installation docs
* [```656890c```](https://github.com/ktmeaton/autologs/commit/656890c) rename notes dev title
```

### Release Notes
Expand Down Expand Up @@ -80,14 +80,12 @@ $ autologs --release --max-commits 5
* [```365e6aa```](https://github.com/ktmeaton/autologs/commit/365e6aa) test markdown code rendering
* [```a945418```](https://github.com/ktmeaton/autologs/commit/a945418) Merge pull request #2 from ktmeaton/dev
* [```de3dd7f```](https://github.com/ktmeaton/autologs/commit/de3dd7f) start documenting commit usage
* [```1f05f16```](https://github.com/ktmeaton/autologs/commit/1f05f16) proper writing to output file
* [```f8c3eed```](https://github.com/ktmeaton/autologs/commit/f8c3eed) bugfix in repo PR url
```

### Changelog

```bash
$ autologs --changelog --max-commits 5
$ autologs --changelog --max-commits 3

# CHANGELOG

Expand All @@ -113,17 +111,8 @@ $ autologs --changelog --max-commits 5
* [```efe7f5b```](https://github.com/ktmeaton/autologs/commit/efe7f5b) make autologs executable
* [```e47ae92```](https://github.com/ktmeaton/autologs/commit/e47ae92) fix uses typo
* [```3197dc0```](https://github.com/ktmeaton/autologs/commit/3197dc0) test 'test' workflow
* [```f2333e5```](https://github.com/ktmeaton/autologs/commit/f2333e5) test lint workflow
* [```8983082```](https://github.com/ktmeaton/autologs/commit/8983082) first lint with pre-commit
```

## To Do

- [x] Rename 'ver' to 'tag'
- Make PR not dependent on max commits.
- [x] Github Actions: Test
- [x] Github Actions: Lint

## Credits

Commit History Style: <https://github.com/yuzu-emu/yuzu-mainline/releases>
Expand Down
7 changes: 3 additions & 4 deletions autologs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Version()
ListParams()
{
echo
echo "Creating Auto $RUN_FLAG with the following parameters."
echo -e "\tRepository: $REPO"
echo -e "\tCommit URL: $COMMIT_URL"
echo -e "\tOld tag: $OLD_TAG"
Expand All @@ -102,7 +101,7 @@ Commits()
while read line;
do
# Stop printing if max commits has been reached
if [[ $i -ge $MAX_COMMITS && $MAX_COMMITS != -1 ]]; then
if [[ $i -ge $MAX_COMMITS && $MAX_COMMITS != "all" ]]; then
break
fi
hash=`echo $line | cut -d " " -f 1`
Expand Down Expand Up @@ -141,8 +140,8 @@ Release()
pr_id=( `git ls-remote origin 'pull/*/head' | cut -f 2 | cut -d "/" -f 3 | tr '\n' ' ' ` )
num_pr=${#arr_pr_commits[@]}

# Retrieve commit hashes
arr_new_tag_commits=($(Commits ${OLD_TAG} ${NEW_TAG} | cut -d '`' -f 4 | tr '\n' ' '))
# Retrieve commit hashes (all)
arr_new_tag_commits=($(Commits ${OLD_TAG} ${NEW_TAG} 'all' | cut -d '`' -f 4 | tr '\n' ' '))

# Search for matching PRs
arr_tag_pr=()
Expand Down

0 comments on commit 3b83bad

Please sign in to comment.