Skip to content

Commit dfa5eb1

Browse files
committed
travis: Enable diffdist.sh
1 parent 2a9376e commit dfa5eb1

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ addons:
3030
- libqt4-dev
3131
- libx11-dev
3232
- pkg-config
33+
- wget
3334

3435
jobs:
3536
include:
@@ -54,4 +55,5 @@ jobs:
5455
make
5556
package_source
5657
VERBOSE=1
58+
- bash -x ./test/diffdist.sh
5759

test/diffdist.sh

+13-4
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,18 @@ VERSION_PATCH=$(grep VERSION_PATCH $SRCDIR/CMakeLists.txt | head -1 | awk -F\" '
1919
VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
2020
PREV_VERSION_PATCH="$(expr $VERSION_PATCH - 1)"
2121
PREV_VERSION="$VERSION_MAJOR.$VERSION_MINOR.$PREV_VERSION_PATCH"
22-
echo "Compare versions $PREV_VERSION $VERSION"
2322
zcat $DSTDIR/ibus-qt-${VERSION}-Source.tar.gz | tar xf -
24-
wget https://github.com/ibus/ibus-qt/releases/download/$PREV_VERSION/ibus-qt-${PREV_VERSION}-Source.tar.gz
25-
zcat ibus-qt-${PREV_VERSION}-Source.tar.gz | tar xf -
26-
diff -r ibus-qt-${PREV_VERSION}-Source ibus-qt-${VERSION}-Source || :
23+
mv ibus-qt-${VERSION}-Source ibus-qt-${VERSION}-Source-new
24+
echo "Get upstream ibus-qt-${VERSION}-Source.tar.gz"
25+
wget https://github.com/ibus/ibus-qt/releases/download/$VERSION/ibus-qt-${VERSION}-Source.tar.gz
26+
if [ $? -ne 0 ] ; then
27+
# This is a bumped commit CI.
28+
echo "Get upstream ibus-qt-${PREV_VERSION}-Source.tar.gz"
29+
wget https://github.com/ibus/ibus-qt/releases/download/$PREV_VERSION/ibus-qt-${PREV_VERSION}-Source.tar.gz
30+
DST_VERSION=$PREV_VERSION
31+
else
32+
DST_VERSION=$VERSION
33+
fi
34+
zcat ibus-qt-${DST_VERSION}-Source.tar.gz | tar xf -
35+
diff -r ibus-qt-${DST_VERSION}-Source ibus-qt-${VERSION}-Source-new || :
2736

0 commit comments

Comments
 (0)