Skip to content

Commit 835818d

Browse files
authored
chore: reduce commits in discovery document update PR (#1699)
* chore: reduce commits in discovery document update * update commit message * remove redundant git reset
1 parent a47764b commit 835818d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

scripts/createcommits.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,24 @@ do
2828
if [ $name = "index" ]; then
2929
git add '../docs/dyn/index.md'
3030
commitmsg='chore: update docs/dyn/index.md'
31-
else
31+
elif [[ -f "$API_SUMMARY_PATH" ]]; then
3232
git add '../googleapiclient/discovery_cache/documents/'$name'.*.json'
3333
git add '../docs/dyn/'$name'_*.html'
34-
if [[ -f "$API_SUMMARY_PATH" ]]; then
35-
commitmsg=`cat $API_SUMMARY_PATH`
36-
else
37-
commitmsg='chore('$name'): update the api'
38-
fi
34+
commitmsg=`cat $API_SUMMARY_PATH`
35+
else
36+
# Do nothing. The files will be included in a bulk commit at the end
37+
continue
3938
fi
4039
git commit -m "$commitmsg"
4140
git rev-parse HEAD>temp/$name'.sha'
4241
git reset
4342
fi
4443
done < temp/changed_files
4544

46-
# Add untracked files
45+
# Add untracked files and files with minor updates
4746
git add "../googleapiclient/discovery_cache/documents/*.json"
4847
git add "../docs/dyn/*.html"
49-
commitmsg='chore(docs): Add new discovery artifacts and reference documents'
48+
commitmsg='chore(docs): Add new discovery artifacts and artifacts with minor updates'
5049
git commit -m "$commitmsg"
5150

5251
exit 0

0 commit comments

Comments
 (0)