ClickHouse/utils/ci/check-tzdata-updates.sh
Mikhail Filimonov a0ae1b2b42 tzdata improvements
Expose version of embedded tzdata via TZDATA_VERSION in system.build_options.
Autogenerate list of shipped timezones. Script to check tzdb updates.
2020-08-12 14:21:40 +02:00

19 lines
533 B
Bash
Executable File

#!/usr/bin/env bash
set -e -x
source default-config
[[ -d "${WORKSPACE}/sources" ]] || die "Run get-sources.sh first"
latest_tzdb_version=$(curl -s https://data.iana.org/time-zones/data/version);
tzdb_version_in_repo=$(cat "${WORKSPACE}/sources/contrib/cctz/testdata/version");
if [ "$tzdb_version_in_repo" = "$latest_tzdb_version" ];
then
echo "No update for TZDB needed";
exit 0;
else
echo "TZDB update required! Version in repo is ${tzdb_version_in_repo}, latest version is ${latest_tzdb_version}";
exit 1
fi;