• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/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
12git subtree pull --prefix third_party/marl https://github.com/google/marl master --squash -m "Update marl"
13
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`
16LOG_MSG=`echo -e "Update Marl to $HEAD_CHANGE\n${REASON}\nChanges:\n$ALL_CHANGES\n\nCommands:\n    git subtree pull --prefix third_party/marl https://github.com/google/marl master --squash\n\nBug: b/140546382"`
17git commit --amend -m "$LOG_MSG"