Skip to content

Commit fc5d039

Browse files
committed
package chip in ci
1 parent 4132974 commit fc5d039

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

.circleci/config.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,46 @@ jobs:
33
build:
44
working_directory: ~/project
55
docker:
6-
- image: circleci/php:7.2-browsers
6+
- image: circleci/php:7.2
77
steps:
88
- checkout
9-
- restore_cache:
10-
key: dependencies-composer-{{ checksum "composer.json" }}
119
- run: composer global require bamarni/composer-bin-plugin
1210
- run: composer bin phpstan require phpstan/phpstan "^0.11.5"
1311
- run: composer bin phpcs require squizlabs/php_codesniffer "^3.4"
1412
- run: composer install -n --prefer-dist
1513

1614
- save_cache:
17-
key: dependencies-composer-{{ checksum "composer.json" }}
15+
key: dependencies-composer-{{ checksum "composer.json" }}-{{ .Revision }}
1816
paths:
1917
- ./vendor
2018
- ./vendor-bin
2119
test:
2220
working_directory: ~/project
2321
docker:
24-
- image: circleci/php:7.2-browsers
22+
- image: circleci/php:7.2
2523
steps:
2624
- checkout
2725
- restore_cache:
2826
keys:
29-
- dependencies-composer-{{ checksum "composer.json" }}
27+
- dependencies-composer-{{ checksum "composer.json" }}-{{ .Revision }}
3028

3129
- run: php vendor/bin/phpcs
3230
- run: php vendor/bin/phpstan analyse src tests -l 1
3331
- run: php vendor/bin/phpunit tests/
32+
33+
package:
34+
working_directory: ~/project
35+
docker:
36+
- image: circleci/php:7.2
37+
steps:
38+
- checkout
39+
- run: composer global require humbug/box "^3.7"
40+
- run: composer install -n --prefer-dist --no-dev
41+
- run: ~/.composer/vendor/bin/box compile -c box.json
42+
43+
- store_artifacts:
44+
path: bin/chip.phar
45+
destination: chip
3446
workflows:
3547
version: 2
3648
build_and_test:

box.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"main": "bin/chip",
3+
"banner": [
4+
"This file is part of the Chip project.",
5+
"",
6+
"(c) phith0n <root@leavesongs.com>",
7+
"https://github.com/phith0n/chip",
8+
"",
9+
"This source file is subject to the MIT license that is bundled",
10+
"with this source code in the file LICENSE."
11+
],
12+
"dump-autoload": true,
13+
"exclude-dev-files": true,
14+
"compression": "GZ"
15+
}

0 commit comments

Comments
 (0)