Skip to content

Commit

Permalink
Enhancement: Extract environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 22, 2020
1 parent 069fadf commit bfc3c1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "**"

env:
COMPOSER_VERSION: "1.9.1"
REQUIRED_PHP_EXTENSIONS: "mbstring"

jobs:
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Require composer/composer"
run: "composer require composer/composer:1.9.1 --no-interaction --no-progress --no-suggest"
run: "composer require composer/composer:${{ env.COMPOSER_VERSION }} --no-interaction --no-progress --no-suggest"

- name: "Validate configuration for humbug/box"
run: "phar/box.phar validate box.json"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- "master"

env:
COMPOSER_VERSION: "1.9.1"
REQUIRED_PHP_EXTENSIONS: "mbstring"

jobs:
Expand Down Expand Up @@ -371,7 +372,7 @@ jobs:
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Require composer/composer"
run: "composer require composer/composer:1.9.1 --no-interaction --no-progress --no-suggest"
run: "composer require composer/composer:${{ env.COMPOSER_VERSION }} --no-interaction --no-progress --no-suggest"

- name: "Remove git placeholder configuration with jq"
run: "echo $(cat box.json | jq 'del(.git)') > box.json"
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
COMPOSER_VERSION:=1.9.1

.PHONY: it
it: coding-standards dependency-analysis static-code-analysis tests ## Runs the coding-standards, dependency-analysis, static-code-analysis, and tests targets

Expand All @@ -23,7 +25,7 @@ help: ## Displays this list of targets with descriptions
.PHONY: phar
phar: vendor ## Builds a phar with humbug/box
phar/box.phar validate box.json
composer require composer/composer:1.9.1 --no-interaction --no-progress --no-suggest
composer require composer/composer:${COMPOSER_VERSION} --no-interaction --no-progress --no-suggest
phar/box.phar compile --config=box.json
git checkout HEAD -- composer.json composer.lock
phar/box.phar info .build/phar/composer-normalize.phar
Expand Down

0 comments on commit bfc3c1f

Please sign in to comment.