Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: update_libvpx.sh

Issue 993123002: Generate the commit message (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash -e 1 #!/bin/bash -e
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This tool is used to update libvpx source code with the latest git 7 # This tool is used to update libvpx source code with the latest git
8 # repository. 8 # repository.
9 # 9 #
10 # Make sure you run this in a git checkout of deps/third_party/libvpx! 10 # Make sure you run this in a git checkout of deps/third_party/libvpx!
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 git clone $GIT_REPO . 48 git clone $GIT_REPO .
49 49
50 # Switch the content to the latest git repo. 50 # Switch the content to the latest git repo.
51 git checkout -b tot $GIT_BRANCH 51 git checkout -b tot $GIT_BRANCH
52 52
53 add="$(git diff-index --diff-filter=A $prev_hash | \ 53 add="$(git diff-index --diff-filter=A $prev_hash | \
54 tr -s [:blank:] ' ' | cut -f6 -d\ )" 54 tr -s [:blank:] ' ' | cut -f6 -d\ )"
55 delete="$(git diff-index --diff-filter=D $prev_hash | \ 55 delete="$(git diff-index --diff-filter=D $prev_hash | \
56 tr -s [:blank:] ' ' | cut -f6 -d\ )" 56 tr -s [:blank:] ' ' | cut -f6 -d\ )"
57 57
58 # Get the current commit hash.
59 hash=$(git log -1 --format="%H")
60
61 # README reminder.
62 echo "Update README.chromium:"
63 echo "==============="
64 echo "Date: $(date +"%A %B %d %Y")"
65 echo "Branch: master"
66 echo "Commit: $hash"
67 echo "==============="
68 echo ""
69
70 # Commit message header.
71 echo "Commit message:"
72 echo "==============="
73 echo "libvpx: Pull from upstream"
74 echo ""
75
Tom Finegan 2015/03/10 22:32:05 could have been a heredoc: cat << EOF everything
58 # Output the current commit hash. 76 # Output the current commit hash.
59 hash=$(git log -1 --format="%H")
60 echo "Current HEAD: $hash" 77 echo "Current HEAD: $hash"
78 echo ""
61 79
62 # Output log for upstream from current hash. 80 # Output log for upstream from current hash.
63 if [ -n "$prev_hash" ]; then 81 if [ -n "$prev_hash" ]; then
64 echo "git log from upstream:" 82 echo "git log from upstream:"
65 pretty_git_log="$(git log \ 83 pretty_git_log="$(git log \
66 --no-merges \ 84 --no-merges \
67 --topo-order \ 85 --topo-order \
68 --pretty="%h %s" \ 86 --pretty="%h %s" \
87 --max-count=20 \
69 $prev_hash..$hash)" 88 $prev_hash..$hash)"
70 if [ -z "$pretty_git_log" ]; then 89 if [ -z "$pretty_git_log" ]; then
71 echo "No log found. Checking for reverts." 90 echo "No log found. Checking for reverts."
72 pretty_git_log="$(git log \ 91 pretty_git_log="$(git log \
73 --no-merges \ 92 --no-merges \
74 --topo-order \ 93 --topo-order \
75 --pretty="%h %s" \ 94 --pretty="%h %s" \
95 --max-count=20 \
76 $hash..$prev_hash)" 96 $hash..$prev_hash)"
77 fi 97 fi
78 echo "$pretty_git_log" 98 echo "$pretty_git_log"
99 # If it makes it to 20 then it's probably skipping even more.
100 if [ `echo "$pretty_git_log" | wc -l` -eq 20 ]; then
101 echo "<...>"
102 fi
79 fi 103 fi
80 104
105 # Commit message footer.
106 echo ""
107 echo "TBR=tomfinegan@chromium.org"
Tom Finegan 2015/03/10 22:32:05 lol
108 echo "==============="
109
81 # Git is useless now, remove the local git repo. 110 # Git is useless now, remove the local git repo.
82 rm -rf .git 111 rm -rf .git
83 112
84 # Add and remove files. 113 # Add and remove files.
85 echo "$add" | xargs -I {} git add {} 114 echo "$add" | xargs -I {} git add {}
86 echo "$delete" | xargs -I {} git rm {} 115 echo "$delete" | xargs -I {} git rm {}
87 116
88 # Find empty directories and remove them. 117 # Find empty directories and remove them.
89 find . -type d -empty -exec git rm {} \; 118 find . -type d -empty -exec git rm {} \;
90 119
91 chmod 755 build/make/*.sh build/make/*.pl configure 120 chmod 755 build/make/*.sh build/make/*.pl configure
92 121
93 cd $BASE_DIR 122 cd $BASE_DIR
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698