Skip to content

Commit

Permalink
added documentation category to docs script #docs
Browse files Browse the repository at this point in the history
also fixed a couple of minor text errors
  • Loading branch information
pyr0ball committed Oct 10, 2019
1 parent f1afd52 commit 322073f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions scripts/changelog.sh
Expand Up @@ -5,12 +5,13 @@
# Commits are separated by category, requiring that the user add tags to commits based on their content
# Adding #bugfix to a commit will add it to the bugfix category
# Adding #featureadd to a commit will add it to the added features category
# Adding #docs to a commit will add it to the documentation category
#
# Usage: pass two tags or commit hashes in when running this script, and a changelog will be generated listing the differences between those two tags.
# If args 3 & 4 are unused, default values will be substituted
# ex:
# ./changelog.sh rev.2.0.1 rev.2.1.1
# ./changelog.sh b1d5817 02cd438 githun-username github project
# ./changelog.sh b1d5817 02cd438 githun-username github-project
#
# The script then generates a markdown file to be used on the documentation site

Expand All @@ -26,14 +27,17 @@ git_user="${3:-pyr0ball}"
git_project="${4:-pyr0piezo}"

# Gather full changelog
changelog=$(git log ${first_tag}...${last_tag} --pretty=format:"- %s [view commit](http://github.com/${git_user}/${git_project}/commit/%H) \n" --reverse | sed 's/#bugfix//g' | sed 's/#featureadd//g')
changelog=$(git log ${first_tag}...${last_tag} --pretty=format:"- %s [view commit](http://github.com/${git_user}/${git_project}/commit/%H) \n" --reverse | sed 's/#bugfix//g' | sed 's/#featureadd//g' | sed 's/#changelog//g' | sed 's/#docs//g')

# Gather bugfixes
bugfixes=$(git log ${first_tag}...${last_tag} --pretty=format:"- %s [view commit](http://github.com/${git_user}/${git_project}/commit/%H) \n" --reverse | grep "#bugfix" | sed 's/#bugfix//g' )

# Gather added features
featureadd=$(git log ${first_tag}...${last_tag} --pretty=format:"- %s [view commit](http://github.com/${git_user}/${git_project}/commit/%H) \n" --reverse | grep "#featureadd" | sed 's/#featureadd//g' )

# Gather added features
docs=$(git log ${first_tag}...${last_tag} --pretty=format:"- %s [view commit](http://github.com/${git_user}/${git_project}/commit/%H) \n" --reverse | grep "#docs" | sed 's/#docs//g' )

# Build a new nav bar entry for the changelog
navadd=" - Changelog $first_tag to $last_tag: /'changelogs/changelog_${date_pretty}_${first_tag}_${last_tag}.md/'"

Expand All @@ -53,6 +57,12 @@ $bugfixes
------------------------------------
#### Documentation Updates
$docs
------------------------------------
#### Full Changelog
$changelog
Expand All @@ -76,6 +86,12 @@ $featureadd
$bugfixes
------------------------------------
*Documentation Updates*
$docs
------------------------------------
*Full Changelog*
Expand Down

0 comments on commit 322073f

Please sign in to comment.