Skip to content

Commit

Permalink
Merge pull request #182 from myii/fix/improve-reusability
Browse files Browse the repository at this point in the history
fix(convert-formula.sh): apply remaining suggestions from #180
  • Loading branch information
myii authored Dec 17, 2019
2 parents cef5b27 + 76ecd44 commit 3901e13
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bin/convert-formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ convert_formula() {
git reset \
"$(echo 'feat: initial commit' \
| git commit-tree 'HEAD^{tree}')"
git rm --quiet bin/convert-formula.sh AUTHORS.md CHANGELOG.md
git rm --quiet bin/convert-formula.sh AUTHORS.md CHANGELOG.md \
docs/_static/css/custom.css docs/AUTHORS.rst docs/CHANGELOG.rst \
docs/conf.py docs/CONTRIBUTING_DOCS.rst docs/index.rst
git mv TEMPLATE "${NEW_NAME}"
grep --recursive --files-with-matches --exclude-dir=.git TEMPLATE . \
| xargs -L 1 ex -sc '%s/TEMPLATE/'"${NEW_NAME}"'/g|x'
| xargs -L 1 ex -u NONE -sc '%s/TEMPLATE/'"${NEW_NAME}"'/g|x'
# shellcheck disable=SC2016 # Expressions don't expand in single quotes
git commit --quiet --all \
--message 'feat: convert `template-formula` to `'"${NEW_NAME}"'-formula`
BREAKING CHANGE: changed all state names and ids'
--message 'feat: convert `template-formula` to `'"${NEW_NAME}"'-formula`' \
--message 'BREAKING CHANGE: changed all state names and ids'
}

args "$@"
Expand Down

0 comments on commit 3901e13

Please sign in to comment.