dfee7b6196
GitOrigin-RevId: b578e69f18a543889ded9c57a8f0dffacdb103d8
13 lines
464 B
Bash
Executable file
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
|