Skip to content

Commit b501985

Browse files
committed
workaround ICU not supporting git yet
- need to verify the output against existing releases Fixes: #7
1 parent b22592e commit b501985

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BINPATH=/src/bin/
88
DISTROS=$(shell cd dockerfiles;ls)
99
DISTROS_SMALL=ubuntu fedora
1010
SRC=src/icu
11-
REV:=$(shell svnversion $(SRC) | tr -d ' ')
11+
REV:=$(shell src/bin/icu-git-rev.sh $(SRC))
1212
all: dirs src/icu
1313

1414
#src/icu: src

src/bin/icu-git-rev.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
# © 2018 and later: Unicode, Inc. and others.
3+
# License & terms of use: http://www.unicode.org/copyright.html
4+
5+
if ! command -v git > /dev/null 2>&1 ; then
6+
echo 'git-not-installed'
7+
exit 1
8+
fi
9+
10+
DIR=${1:-/src/icu}
11+
cd ${DIR} >/dev/null || exit 1
12+
13+
echo $(git rev-parse --short HEAD)
14+
exit 0

src/bin/makedist.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ if [ -f /etc/os-release ];
88
then
99
. /etc/os-release
1010
fi
11-
FN=icu-r${REV-$(svnversion /src/icu/ | tr -d ' ')}-$(bash /src/icu/icu4c/source/config.guess)-${NAME-${WHAT}}-${VERSION_ID-UNKNOWN}
11+
ICUREV=$(/src/bin/icu-git-rev.sh)
12+
FN=icu-r${REV-${ICUREV}}-$(bash /src/icu/icu4c/source/config.guess)-${NAME-${WHAT}}-${VERSION_ID-UNKNOWN}
1213
if [ ! -f config.status ];
1314
then
1415
icu-configure.sh || exit 1
1516
fi
1617
rm -rf /tmp/icu
17-
make -j${CORES} check && make -j${CORES} DESTDIR=/tmp/icu releaseDist || exit 1
18+
make -j${CORES} check && make -j${CORES} DESTDIR=/tmp/icu SVNVER=${ICUREV} releaseDist || exit 1
1819
#cp -v *-src-*.tgz /dist/${FN}-src.tgz || true
1920
cd /tmp/
2021
if [ -f /dist/${FN}.tgz ];

src/bin/makesdoc.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@ if [ ! -f config.status ];
99
then
1010
icu-configure.sh --disable-tests --disable-extras || exit 1
1111
fi
12+
ICUREV=$(/src/bin/icu-git-rev.sh)
1213

1314

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

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

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

2526
rm -rf doc
26-
make doc-searchengine
27+
make doc-searchengine SVNVER=${ICUREV}
2728

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

0 commit comments

Comments
 (0)