Skip to content

Commit 0f7db88

Browse files
committed
installing prism locally with test/prism.sh
1 parent 2fe809f commit 0f7db88

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ addons:
1818
apt_packages:
1919
- pandoc
2020
before_script:
21-
- mkdir prism
22-
- mkdir prism/bin
23-
- export PATH=$PATH:$PWD/prism/bin/
24-
- ./test/prism.sh
21+
- . ./test/prism.sh
22+
- prism version
2523
script:
2624
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then unit2 discover; else python -m unittest
2725
discover; fi

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ The above local "Initial setup" is complete
137137

138138
* [pyenv](https://github.com/yyuu/pyenv)
139139
* [tox](https://pypi.python.org/pypi/tox)
140+
* [prism](https://github.com/stoplightio/prism) v0.6 - you can also install it locally by using `test/prism.sh` script
140141

141142
#### Initial setup: ####
142143

test/prism.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,24 @@ elif [ "$UNAME" = "Linux" ] ; then
2626
fi
2727

2828
#LATEST=$(curl -s https://api.github.com/repos/stoplightio/prism/tags | grep -Eo '"name":.*?[^\\]",' | head -n 1 | sed 's/[," ]//g' | cut -d ':' -f 2)
29-
LATEST="v0.1.5"
29+
LATEST="v0.6.21"
3030
URL="https://github.com/stoplightio/prism/releases/download/$LATEST/prism_$PLATFORM"
31-
DEST=./prism/bin/prism
31+
DESTDIR=./prism/bin
32+
DEST=$DESTDIR/prism
3233

3334
if [ -z $LATEST ] ; then
3435
echo "Error requesting. Download binary from ${URL}"
3536
exit 1
3637
else
38+
mkdir -p $DESTDIR
3739
curl -L $URL -o $DEST
3840
chmod +x $DEST
41+
export PATH=$PATH:$DESTDIR
42+
prism version
3943
fi
4044
}
4145

42-
install
46+
install
47+
48+
# this is needed for travis internal scripts
49+
set +u

0 commit comments

Comments
 (0)