github.com/whamcloud/lemur@v0.0.0-20190827193804-4655df8a52af/packaging/ci/lambda/NotifyGithub/Makefile (about)

     1  PYTHON ?= python2.7
     2  PIP_PACKAGES ?= PyGithub
     3  FUNCTION_NAME = $(notdir $(CURDIR))
     4  OUTDIR ?= $(dir $(CURDIR))
     5  ZIPFILE ?= $(OUTDIR)/$(FUNCTION_NAME).zip
     6  
     7  $(ZIPFILE): dist
     8  	rm -f $@
     9  	pushd dist >/dev/null && \
    10  	zip -r $@ * && \
    11  	popd >/dev/null
    12  
    13  dist: *.py $(dir $(CURDIR))/lemur_ci/*.py
    14  	rm -fr dist
    15  	mkdir dist
    16  	cp -a *.py $(dir $(CURDIR))/lemur_ci dist
    17  	for pkg in $(PIP_PACKAGES); do \
    18  		pip install --no-compile -t dist $$pkg; \
    19  		rm -fr dist/*/tests; \
    20  	done
    21  
    22  clean:
    23  	rm -fr dist $(ZIPFILE)
    24  
    25  .PHONY: clean