blob: 4ba5518613beab7bfe4578c13efd1c0833b4cf4c [file] [log] [blame]
Ben Claytond42d2fd2020-02-13 18:36:28 +00001#!/bin/bash
2
3# update-marl merges the latest changes from the github.com/google/marl into
4# third_party/marl. This script copies the change descriptions from the squash
5# change into the top merge change, along with a standardized description.
6REASON=$1
7
8if [ ! -z "$REASON" ]; then
9 REASON="\n$REASON\n"
10fi
11
Ben Claytonaf80f852020-06-15 15:31:58 +010012git subtree pull --prefix third_party/marl https://github.com/google/marl main --squash -m "Update marl"
Ben Claytond42d2fd2020-02-13 18:36:28 +000013
14ALL_CHANGES=`git log -n 1 HEAD^2 | egrep '^(\s{4}[0-9a-f]{9}\s*.*)$'`
15HEAD_CHANGE=`echo "$ALL_CHANGES" | egrep '[0-9a-f]{9}' -o -m 1`
Ben Clayton02e15b22020-03-26 20:19:56 +000016LOG_MSG=`echo -e "Update Marl to $HEAD_CHANGE\n${REASON}\nChanges:\n$ALL_CHANGES\n\nCommands:\n ./third_party/update-marl.sh --squash\n\nBug: b/140546382"`
17git commit --amend -m "$LOG_MSG"