blob: 337d72e92f661d907b2046ed25db455d141c13cf [file] [log] [blame]
Primiano Tucci94f90f02019-07-09 19:47:12 +01001# Copyright (C) 2019 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15
Primiano Tucci022601d2022-04-19 21:02:34 +020016include $(shell python3 ../config.py makefile)
Primiano Tucci94f90f02019-07-09 19:47:12 +010017
18test: lib/.stamp config.py common_utils.py
19 GOOGLE_APPLICATION_CREDENTIALS=../test-credentials.json \
Primiano Tucci022601d2022-04-19 21:02:34 +020020 python3 `which dev_appserver.py` app.yaml --dev_appserver_log_level ${LOGLEVEL}
Primiano Tucci94f90f02019-07-09 19:47:12 +010021
22deploy: lib/.stamp config.py common_utils.py
23 gcloud app deploy -q app.yaml queue.yaml cron.yaml \
24 --project ${PROJECT} \
25 -v ${GAE_VERSION} \
Primiano Tucci94f90f02019-07-09 19:47:12 +010026 --stop-previous-version
27
28stop:
29 gcloud app instances delete \
30 $(shell gcloud app instances list --project ${PROJECT} -v ${GAE_VERSION} -s default | tail -n1 | awk '{print $$3}') \
31 --project ${PROJECT} -v ${GAE_VERSION} -s default -q
32
33lib/.stamp:
Primiano Tuccieda90922024-02-27 16:41:50 +000034 echo "If this fails run sudo apt install python-pip"
Primiano Tucci4a295f42022-07-04 13:03:31 +010035 python2.7 -m pip install -t lib/ rsa==4.0 oauth2client==4.1.3 httplib2==0.20.4
Primiano Tucci94f90f02019-07-09 19:47:12 +010036 touch $@
37
38config.py: ../config.py
39 cp ../$@ $@
40
41common_utils.py: ../common_utils.py
42 cp ../$@ $@
43
44.PHONY: deploy test