diff --git a/Dockerfile b/Dockerfile index 17508f2..5f154f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -225,6 +225,10 @@ RUN \ ./config shared --prefix=${PREFIX}/openssl --openssldir=${PREFIX}/openssl; \ make depend; make install; cd ..; rm -rf openssl +# rsync is required by bin/package.sh, so install it here +RUN \ + yum install -y rsync + # Copy shell scripts and config files over COPY bin/* /usr/local/bin/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3498903 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +build: + ./build-and-test.sh + +clean: + -rm -rf lambda/ + -rm lambda-deploy.zip + -rm python/lambda-deploy.zip + git ls-files -o python/lambda | while read f; do rm -- "$$f"; done \ No newline at end of file diff --git a/build-and-test.sh b/build-and-test.sh index 26ac040..2ab2f46 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -1,10 +1,11 @@ #!/bin/bash - +set -e VERSION=$(cat VERSION) PYVERSION=$(cat python/PYVERSION) +INTERACTIVE=$(if test -t 0; then echo -i; fi) docker build . -t developmentseed/geolambda:${VERSION} -docker run --rm -v $PWD:/home/geolambda -it developmentseed/geolambda:${VERSION} package.sh +docker run --rm -v $PWD:/home/geolambda ${INTERACTIVE} -t developmentseed/geolambda:${VERSION} package.sh cd python docker build . --build-arg VERSION=${VERSION} -t developmentseed/geolambda:${VERSION}-python