diff --git a/.travis.yml b/.travis.yml index 26a2f67b..03ef6513 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ go: sudo: false script: - - ./scripts/travis.sh + - ./scripts/test-and-build.sh diff --git a/jenkins.sh b/jenkins.sh index d8950ade..79b77acb 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -1,25 +1,3 @@ -#! /bin/bash +#!/bin/sh -set -ex - -virtualenv env -. env/bin/activate -pip install -r scripts/requirements.txt - -# do sanity checks on the examples and swagger -(cd event-schemas/ && ./check_examples.py) -(cd api && ./check_examples.py) -(cd api && npm install && node validator.js -s "client-server") - -: ${GOPATH:=${WORKSPACE}/.gopath} -mkdir -p "${GOPATH}" -export GOPATH -go get github.com/hashicorp/golang-lru -go get gopkg.in/fsnotify.v1 - -# make sure that the scripts build -(cd scripts/continuserv && go build) -(cd scripts/speculator && go build) - -# build the spec and collect the supporting docs for matrix.org -./scripts/generate-matrix-org-assets +exec ./scripts/test-and-build.sh diff --git a/scripts/travis.sh b/scripts/test-and-build.sh similarity index 74% rename from scripts/travis.sh rename to scripts/test-and-build.sh index 9fe49856..cd25ded2 100755 --- a/scripts/travis.sh +++ b/scripts/test-and-build.sh @@ -2,6 +2,8 @@ set -ex +cd `dirname $0`/.. + virtualenv env . env/bin/activate pip install -r scripts/requirements.txt @@ -21,7 +23,7 @@ go get gopkg.in/fsnotify.v1 (cd scripts/continuserv && go build) (cd scripts/speculator && go build) -# build the spec and collect the supporting docs for matrix.org. (we aren't -# actually going to use them, since we're on travis, but we may as well check -# that the build works correctly). +# build the spec for matrix.org. +# (we don't actually use it on travis, but it's still useful to check we +# can build it. On Jenkins, this is then used to deploy to matrix.org). ./scripts/generate-matrix-org-assets