Skip to content

Commit

Permalink
Merge 32cf5c1 into 753d1da
Browse files Browse the repository at this point in the history
  • Loading branch information
l-w-2017 committed Oct 11, 2018
2 parents 753d1da + 32cf5c1 commit 1efc64c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -21,7 +21,6 @@ before_install:
- wget http://us.archive.ubuntu.com/ubuntu/pool/universe/w/wrk/wrk_4.0.1-2_amd64.deb
- sudo dpkg -i wrk_4.0.1-2_amd64.deb
- rm wrk_4.0.1-2_amd64.deb
- pip install --user yq
install:
- make jenkins-install
script:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -23,6 +23,7 @@ install:
@echo "Mounting git pre-push hook"
cp .git-pre-push-hook .git/hooks/pre-push
@echo "Installing Glide and locked dependencies..."
pip install --user yq
glide --version || go get -u -f github.com/Masterminds/glide
glide install

Expand Down
3 changes: 0 additions & 3 deletions README.md
Expand Up @@ -388,9 +388,6 @@ make install
```
make generate
```
If this fails due to `yq: command not found`, then install `yq` by running `pip install yq`.
If you have already installed `yq` and the build fails due to `unknown command "examples/example-gateway/clients/baz/client-config.yaml" for "yq"` then delete `yq` and reinstall by running `pip install --force-reinstall yq`. This is because Zanzibar uses the python distribution of `yq` so other distributions of `yq` will not work.

### Running the tests

```
Expand Down
5 changes: 3 additions & 2 deletions codegen/runner/pre-steps.sh
Expand Up @@ -16,6 +16,7 @@ if [ -z "$3" ]; then
exit 1
fi

YQ=$(pip show yq | grep Location | cut -d' ' -f2 | sed 's/lib\/.*/bin\/yq/')
BUILD_DIR="$1"
CONFIG_DIR="$2"
ANNOPREFIX="$3"
Expand Down Expand Up @@ -91,7 +92,7 @@ for config_file in ${config_files}; do
continue
fi

processor="yq"
processor="$YQ"
if [[ $config_file == *.json ]]; then
processor="jq"
fi
Expand All @@ -101,7 +102,7 @@ for config_file in ${config_files}; do
dir=$(dirname "$config_file")
yaml_files=$(find "$dir" -name "*.json" -o -name "*.yaml")
for yaml_file in ${yaml_files}; do
processor="yq"
processor="$YQ"
if [[ $yaml_file == *.json ]]; then
processor="jq"
fi
Expand Down

0 comments on commit 1efc64c

Please sign in to comment.