Skip to content

Commit

Permalink
workaround ICU not supporting git yet
Browse files Browse the repository at this point in the history
- need to verify the output against existing releases

Fixes: #7
  • Loading branch information
srl295 committed Mar 4, 2019
1 parent b61c225 commit aeec3ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
14 changes: 14 additions & 0 deletions src/bin/icu-git-rev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
# © 2018 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html

if ! command -v git > /dev/null 2>&1 ; then
echo 'git-not-installed'
exit 1
fi

DIR=${1:-/src/icu}
cd ${DIR} >/dev/null || exit 1

echo $(git rev-parse --short HEAD)
exit 0
5 changes: 3 additions & 2 deletions src/bin/makedist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ if [ -f /etc/os-release ];
then
. /etc/os-release
fi
FN=icu-r${REV-$(svnversion /src/icu/ | tr -d ' ')}-$(bash /src/icu/icu4c/source/config.guess)-${NAME-${WHAT}}-${VERSION_ID-UNKNOWN}
ICUREV=$(/src/bin/icu-git-rev.sh)
FN=icu-r${REV-${ICUREV}}-$(bash /src/icu/icu4c/source/config.guess)-${NAME-${WHAT}}-${VERSION_ID-UNKNOWN}
if [ ! -f config.status ];
then
icu-configure.sh || exit 1
fi
rm -rf /tmp/icu
make -j${CORES} check && make -j${CORES} DESTDIR=/tmp/icu releaseDist || exit 1
make -j${CORES} check && make -j${CORES} DESTDIR=/tmp/icu SVNVER=${ICUREV} releaseDist || exit 1
#cp -v *-src-*.tgz /dist/${FN}-src.tgz || true
cd /tmp/
if [ -f /dist/${FN}.tgz ];
Expand Down
7 changes: 4 additions & 3 deletions src/bin/makesdoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ if [ ! -f config.status ];
then
icu-configure.sh --disable-tests --disable-extras || exit 1
fi
ICUREV=$(/src/bin/icu-git-rev.sh)


if [ -f /etc/os-release ];
then
. /etc/os-release
fi
FN=icu-r${REV-$(svnversion /src/icu/ | tr -d ' ')}-$(bash /src/icu/icu4c/source/config.guess)-${NAME-${WHAT}}-${VERSION_ID-UNKNOWN}
FN=icu-r${ICUREV}-$(bash /src/icu/icu4c/source/config.guess)-${NAME-${WHAT}}-${VERSION_ID-UNKNOWN}

rm -rf dist /dist/${FN}-src.d || true
make -j${CORES} && make dist
make -j${CORES} && make dist SVNVER=${ICUREV}

mv -v dist /dist/${FN}-src.d

rm -rf doc
make doc-searchengine
make doc-searchengine SVNVER=${ICUREV}

#FN=icu-r$(svnversion /src/icu/ | tr -d ' ')-$(bash /src/icu/icu4c/source/config.guess)-${1:RANDOM}
tar cfpz /dist/${FN}-sdoc.tgz ./doc || exit 1
Expand Down

0 comments on commit aeec3ec

Please sign in to comment.