Skip to content

Commit

Permalink
minor #30778 [Intl] Simplify the compile binary (jakzal)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Simplify the compile binary

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The intl docker image comes with build-essential packages now, so there's no need for additional installation steps.

re #30584

Commits
-------

b3184c2 [Intl] Simplify the compile binary
  • Loading branch information
fabpot committed Mar 30, 2019
2 parents 755d481 + b3184c2 commit 6b8ff62
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/Symfony/Component/Intl/Resources/bin/compile
@@ -1,12 +1,14 @@
#!/usr/bin/env bash

if [[ $1 == force || ! $(docker ps -a | grep symfony-intl) ]]; then
docker rm -f symfony-intl
docker create --name symfony-intl -it -v /tmp:/tmp -v $(pwd):/app -w /app jakzal/php-intl:7.2-63.1 bash
docker start symfony-intl
docker exec symfony-intl bash -xc "apt-get update && apt-get -y install build-essential"
else
docker start symfony-intl
if [[ $1 == force ]]; then
docker pull jakzal/php-intl
fi;

docker exec -u $(id -u):$(id -g) symfony-intl php src/Symfony/Component/Intl/Resources/bin/update-data.php
docker run \
-it --rm --name symfony-intl \
-u $(id -u):$(id -g) \
-v /tmp/symfony/icu:/tmp \
-v $(pwd):/symfony \
-w /symfony \
jakzal/php-intl:latest \
php src/Symfony/Component/Intl/Resources/bin/update-data.php

0 comments on commit 6b8ff62

Please sign in to comment.