Ben Clayton | 02e15b2 | 2020-03-26 20:19:56 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # update-spirvheaderss merges the latest changes from |
| 4 | # the github.com/KhronosGroup/SPIRV-Headers into third_party/SPIRV-Headers. |
| 5 | # This script copies the change descriptions from the squash change into the |
| 6 | # top merge change, along with a standardized description. |
| 7 | REASON=$1 |
| 8 | |
| 9 | if [ ! -z "$REASON" ]; then |
| 10 | REASON="\n$REASON\n" |
| 11 | fi |
| 12 | |
| 13 | git subtree pull --prefix third_party/SPIRV-Headers https://github.com/KhronosGroup/SPIRV-Headers master --squash -m "Update SPIR-V Headers" |
| 14 | |
| 15 | ALL_CHANGES=`git log -n 1 HEAD^2 | egrep '^(\s{4}[0-9a-f]{9}\s*.*)$'` |
| 16 | HEAD_CHANGE=`echo "$ALL_CHANGES" | egrep '[0-9a-f]{9}' -o -m 1` |
| 17 | LOG_MSG=`echo -e "Update SPIR-V Headers to $HEAD_CHANGE\n${REASON}\nChanges:\n$ALL_CHANGES\n\nCommands:\n ./third_party/update-spirvheaders.sh \n\nBug: b/123642959"` |
| 18 | git commit --amend -m "$LOG_MSG" |