depot/third_party/copybara/scripts/update_docs
Default email dfee7b6196 Project import generated by Copybara.
GitOrigin-RevId: b578e69f18a543889ded9c57a8f0dffacdb103d8
2020-05-15 16:19:19 -04:00

13 lines
464 B
Bash
Executable file

#!/bin/bash
bazel build java/com/google/copybara:docs
mkdir -p docs
cp bazel-bin/java/com/google/copybara/docs.md docs/reference.md
git add docs/reference.md
# If -a we ammend the current head commit
if [[ $1 == '-a' ]]; then
echo "Ammending current commit ($(git rev-parse HEAD))"
git commit docs/reference.md --amend -C HEAD
else
echo "Creating a new commit"
git commit docs/reference.md -m "Update reference documentation to latest version"
fi