]> git.pld-linux.org Git - packages/php-pecl-archive.git/blob - branch.sh
up to 0.3.1 via branch.diff
[packages/php-pecl-archive.git] / branch.sh
1 #!/bin/sh
2 set -e
3 pecl=archive
4 git=https://git.php.net/repository/pecl/file_formats/$pecl.git
5 tag=RELEASE_1_0_4
6 out=branch.diff
7
8 d=$-
9 filter() {
10         set -$d
11         # drop package.xml (does not apply)
12         filterdiff -x '*/package.xml' | \
13         # remove revno's for smaller diffs
14         sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
15 }
16
17 if [ -d $pecl ]; then
18         cd $pecl
19         git pull --rebase
20         cd ..
21 else
22         git clone $git
23 fi
24
25 export GIT_DIR=$(pwd)/$pecl/.git
26 git diff $tag..master | filter > $out.tmp
27
28 if cmp -s $out{,.tmp}; then
29         echo >&2 "No new diffs..."
30         rm -f $out.tmp
31         exit 0
32 fi
33 mv -f $out{.tmp,}
This page took 0.055154 seconds and 3 git commands to generate.