Skip to content

Commit

Permalink
Add docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Sep 22, 2019
1 parent 2018f4e commit e6e8077
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Dockerfile
@@ -0,0 +1,5 @@
FROM php:cli

COPY ./api-compat /bin/api-compat

WORKDIR /code
9 changes: 8 additions & 1 deletion Makefile
@@ -1,5 +1,12 @@
phar:
composer install --no-dev;rm -rf tests/;rm ./api-compat;rm ./api-compat.tar.gz;phar-composer build;mv ./api-compat.phar ./api-compat;tar -zcvf ./api-compat.tar.gz ./api-compat;git reset --hard;composer install
@test -f $$HOME/.cache/composer/phar-composer.phar || (mkdir -p $$HOME/.cache/composer/ && wget https://github.com/clue/phar-composer/releases/download/v1.0.0/phar-composer.phar -O $$HOME/.cache/composer/phar-composer.phar)
@composer install --no-dev;rm -rf tests/;rm ./api-compat;rm ./api-compat.tar.gz;php -d phar.readonly=off $$HOME/.cache/composer/phar-composer.phar build;mv ./api-compat.phar ./api-compat;tar -zcvf ./api-compat.tar.gz ./api-compat;composer install

docker-build:
@docker build . -t swaggest/api-compat:$(shell git describe --abbrev=0 --tags)

docker-push:
@docker push swaggest/api-compat

lint:
@test -f $$HOME/.cache/composer/phpstan-0.11.8.phar || wget https://github.com/phpstan/phpstan/releases/download/0.11.8/phpstan.phar -O $$HOME/.cache/composer/phpstan-0.11.8.phar
Expand Down
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -50,6 +50,20 @@ Breaking changes detected in new swagger schema

## Installation

### Docker

```
docker run -v $(pwd)/tests/resources:/code swaggest/api-compat api-compat petstore1.json petstore2.json --verbose
Optional parameter became required at #/paths/'/pet/{petId}'/post/parameters/2/required
Parameter disposition has changed at #/paths/'/pet/{petId}/uploadImage'/post/parameters/1/in
original: "formData"
new: "header"
Parameter type has changed at #/paths/'/pet/{petId}/uploadImage'/post/parameters/1/type
original: "string"
new: "integer"
...
```

### Library

```bash
Expand Down

0 comments on commit e6e8077

Please sign in to comment.