Skip to content

Commit

Permalink
Merge pull request #401 from mithro/master
Browse files Browse the repository at this point in the history
Update submodules (and improve updating script).
  • Loading branch information
mithro committed Jan 26, 2018
2 parents bc7feb5 + 314f9e6 commit 262e450
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion third_party/flash_proxies
2 changes: 1 addition & 1 deletion third_party/litedram
2 changes: 1 addition & 1 deletion third_party/litescope
2 changes: 1 addition & 1 deletion third_party/liteusb
2 changes: 1 addition & 1 deletion third_party/litevideo
9 changes: 8 additions & 1 deletion third_party/merge-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for TARGET in ${MODULES[@]}; do
popd > /dev/null
done

if [ $DIRTY -eq 0 ]; then
if [ $DIRTY = 0 ]; then
echo "All targets clean, good to update."
else
echo "Some target are dirty, can't update."
Expand All @@ -62,13 +62,20 @@ for TARGET in ${MODULES[@]}; do
BEFORE_VER=$(git describe --always --dirty)
git fetch origin | sed -e's/^/ /'
git checkout origin/$BRANCH | sed -e's/^/ /'
git submodule update --recursive --init
AFTER_VER=$(git describe --always --dirty)
if echo $AFTER_VER | grep -q "dirty"; then
echo "Updated version is dirty!?"
exit 1
fi
if [ x"$BEFORE_VER" = x"$AFTER_VER" ]; then
echo "$TARGET is unchanged"
else
echo "Move $TARGET from $BEFORE_VER to $AFTER_VER"
cat >> $COMMIT_MSG <<EOF
* $TARGET changed from $BEFORE_VER to $AFTER_VER
$(git log --graph --pretty=format:'%h - %s <%an>' --no-color --abbrev-commit $BEFORE_VER..$AFTER_VER | sed -e's/^/ /')
EOF
fi
echo
Expand Down

0 comments on commit 262e450

Please sign in to comment.