From c2d37e6291b5e4809339684355b0687bdc627cd8 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Fri, 5 Apr 2013 12:37:05 +0200 Subject: [PATCH] [Intl] Improved error messages in the build scripts --- .../Intl/Resources/bin/copy-stubs-to-component.php | 4 +++- src/Symfony/Component/Intl/Resources/bin/create-stubs.php | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Intl/Resources/bin/copy-stubs-to-component.php b/src/Symfony/Component/Intl/Resources/bin/copy-stubs-to-component.php index e85e2f36fd..951cac959c 100644 --- a/src/Symfony/Component/Intl/Resources/bin/copy-stubs-to-component.php +++ b/src/Symfony/Component/Intl/Resources/bin/copy-stubs-to-component.php @@ -45,8 +45,10 @@ if (!class_exists('\Symfony\Component\Icu\IcuData')) { bailout('You must run "composer update --dev" before running this script.'); } +$stubBranch = '1.0.x'; + if (!IcuData::isStubbed()) { - bailout('You should load a version of the Icu component contains stub files (i.e. *.0.x).'); + bailout("Please switch to the Icu component branch $stubBranch."); } $filesystem = new Filesystem(); diff --git a/src/Symfony/Component/Intl/Resources/bin/create-stubs.php b/src/Symfony/Component/Intl/Resources/bin/create-stubs.php index 6f6765123f..d330d6b5fb 100644 --- a/src/Symfony/Component/Intl/Resources/bin/create-stubs.php +++ b/src/Symfony/Component/Intl/Resources/bin/create-stubs.php @@ -49,8 +49,10 @@ if (!class_exists('\Symfony\Component\Icu\IcuData')) { bailout('You must run "composer update --dev" before running this script.'); } +$stubBranch = '1.0.x'; + if (IcuData::isStubbed()) { - bailout('You should load a version of the Icu component that does not contain stub files (i.e. not *.0.x).'); + bailout("Please switch to a branch of the Icu component that contains .res files (anything but $stubBranch)."); } $shortIcuVersionInPhp = strip_minor_versions(Intl::getIcuVersion()); @@ -105,6 +107,6 @@ echo "Wrote $versionFile.\n"; echo "Done.\n"; -echo wordwrap("Please change the Icu component to branch 1.0.x now and run:\n", LINE_WIDTH); +echo wordwrap("Please change the Icu component to branch $stubBranch now and run:\n", LINE_WIDTH); echo "\n php copy-stubs-to-component.php\n";