summaryrefslogtreecommitdiff
path: root/UPDATING
blob: c5c688a407c9f393e974d947e5e28e3307bce337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh

set -xe

# If a branch name is passed on the command line then sync
# to that instead of HEAD.
branch="$1"

old_revision=$(cat BORINGSSL_REVISION)
rm -Rf src
git clone https://boringssl.googlesource.com/boringssl src
cd src
if [ "$branch" ]; then
  git checkout "$branch"
fi
new_revision=$(git show -s --pretty=%H)
if [ "$branch" ]; then
  target="branch $branch"
else
  target="$new_revision"
fi
msgfile=$(mktemp)

echo "external/boringssl: Sync to ${target}.

This includes the following changes:

https://boringssl.googlesource.com/boringssl/+log/${old_revision}..${new_revision}
" > $msgfile

# Just pull out commit titles and any Update-Note paragraphs for AOSP commit summary
git log --format='format:* %s%n%n%b' ${old_revision}..${new_revision} \
  | awk -v RS='' -v ORS='\n' '/^Update-Note/ {print} /^\*/ {print}' \
  >> $msgfile


cd ..
echo "
Test: treehugger" >> $msgfile
if [ ! "$branch" ]; then
  echo ${new_revision} > BORINGSSL_REVISION
fi

rm -Rf src/.git
rm -Rf src/fuzz
# Omit the experimental new certificate verifier library for now.
rm -Rf src/pki
rm -Rf src/third_party/googletest
rm -Rf apple-aarch64 apple-arm apple-x86 apple-x86_64 ios-aarch64 ios-arm \
   linux-aarch64 linux-arm linux-ppc64le linux-x86 linux-x86_64 win-aarch64 win-x86 win-x86_64

python3 src/util/generate_build_files.py android android-cmake bazel cmake eureka
cp src/LICENSE NOTICE

git add .
git commit --no-verify -F $msgfile
rm -f $msgfile