blob: 3f27d3e03ccc19d3b5b3df1fcd746906ad4e72e5 [file] [log] [blame] [edit]
# Makefile to create & manage python pip packages.
#
# Currently this only supports a single package but we can extend that similar
# to https://eureka-internal.git.corp.google.com/fragglerock/+/master/Makefile
#
# Clean the generated files
# $ make clean
#
# Create the pip package
# $ make dist
#
# Deploy the package. Note you must be in the cast-test mdb and have valid loas
# credentials to deploy.
# $ make deploy
#
# Or just run make to deploy everything
# $ make
# The hostname where this file is being run.
HOST=$(shell hostname)
# The current folder.
CWD=$(shell pwd)
DEPLOYDIR=/cns/pf-d/home/cast-test/media/static/packages/
PIP_TOOL=/google/data/ro/teams/chromecast/platform/tools/update_pip.par
all: deploy
clean:
rm -rf $(CWD)/dist
rm -rf $(CWD)/*.egg-info
dist:
python setup.py sdist
copy_package:
fileutil cp -f \
$(CWD)/dist/* \
$(DEPLOYDIR) \
--gfs_user cast-test
update_repo:
$(PIP_TOOL) --nodry_run \
--package home-monitoring \
--environment prod
deploy: dist copy_package update_repo clean