This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
base.mk
727 lines (596 loc) · 20.2 KB
/
base.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# Project Makefile
# ================
#
# A generic makefile for projects
#
# - https://github.com/project-makefile/project-makefile
#
#
# License
# ------------------------------------------------------------------------------
#
# Copyright 2016—2022 Jeffrey A. Clark, "Alex"
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#
# Overview of concepts
# ------------------------------------------------------------------------------
#
# Goal
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "By default, the goal is the first target in the makefile (not counting targets
# that start with a period). Therefore, makefiles are usually written so that the
# first target is for compiling the entire program or programs they describe. If
# the first rule in the makefile has several targets, only the first target in the
# rule becomes the default goal, not the whole list. You can manage the selection
# of the default goal from within your makefile using the .DEFAULT_GOAL variable
# (see Other Special Variables)."
#
# - https://www.gnu.org/software/make/manual/html_node/Goals.html
#
# Default goal
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "Sets the default goal to be used if no targets were specified on the command
# line (see Arguments to Specify the Goals). The .DEFAULT_GOAL variable allows
# you to discover the current default goal, restart the default goal selection
# algorithm by clearing its value, or to explicitly set the default goal."
#
# - https://www.gnu.org/software/make/manual/html_node/Special-Variables.html#Special-Variables
#
# Variables
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "A variable is a name defined in a makefile to represent a string of text, called
# the variable's value. These values are substituted by explicit request into targets,
# prerequisites, recipes, and other parts of the makefile."
#
# - https://www.gnu.org/software/make/manual/html_node/Using-Variables.html
#
# Flavors
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "The first flavor of variable is a recursively expanded variable. Variables of
# this sort are defined by lines using ‘=’ (see Setting Variables) or by the
# define directive (see Defining Multi-Line Variables). The value you specify
# is installed verbatim; if it contains references to other variables, these
# references are expanded whenever this variable is substituted (in the course
# of expanding some other string). When this happens, it is called recursive expansion.
#
# To avoid all the problems and inconveniences of recursively expanded variables,
# there is another flavor: simply expanded variables.
#
# Simply expanded variables are defined by lines using ‘:=’ or ‘::=’ (see Setting
# Variables). Both forms are equivalent in GNU make; however only the ‘::=’ form
# is described by the POSIX standard (support for ‘::=’ was added to the POSIX
# standard in 2012, so older versions of make won’t accept this form either)."
#
# - https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors
#
# Rules
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "A rule appears in the makefile and says when and how to remake certain files,
# called the rule's targets (most often only one per rule). It lists the other
# files that are the prerequisites of the target, and the recipe to use to
# create or update the target."
#
# - https://www.gnu.org/software/make/manual/html_node/Rules.html
#
# Overrides
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "Sometimes it is useful to have a makefile that is mostly just like another makefile.
# You can often use the ‘include’ directive to include one in the other, and add more
# targets or variable definitions. However, it is invalid for two makefiles to give
# different recipes for the same target. But there is another way."
#
# - https://www.gnu.org/software/make/manual/html_node/Overriding-Makefiles.html
#
# Includes
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "The include directive tells make to suspend reading the current makefile and
# read one or more other makefiles before continuing.
#
# - https://www.gnu.org/software/make/manual/html_node/Include.html
# Phony Targets
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# "A phony target is one that is not really the name of a file; rather it is
# just a name for a recipe to be executed when you make an explicit request.
# There are two reasons to use a phony target: to avoid a conflict with a file
# of the same name, and to improve performance."
#
# - https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
#
# Variables
# ------------------------------------------------------------------------------
#
.DEFAULT_GOAL := usage
GIT_MESSAGE := Update
# http://unix.stackexchange.com/a/37316
GIT_BRANCHES = `git branch -a \
| grep remote \
| grep -v HEAD \
| grep -v main \
| grep -v master`
PROJECT_NAME := project
# https://stackoverflow.com/a/589260/185820
RANDIR := $(shell openssl rand -base64 12 | sed 's/\///g')
# https://stackoverflow.com/a/589260/185820
TMPDIR := $(shell mktemp -d)
# https://stackoverflow.com/a/589260/185820
UNAME := $(shell uname)
# https://stackoverflow.com/a/649462/185820
define HOME_PAGE
{% extends "base.html" %}
{% load webpack_loader static %}
{% block body_class %}template-homepage{% endblock %}
{% block extra_css %}
{% stylesheet_pack 'app' %}
{% endblock extra_css %}
{% block content %}
{% load webpack_loader static %}
<div class="jumbotron py-5">
<div class="container">
<a href="/" class="text-decoration-none text-dark"><h1 class="display-3">Hello, world!</h1></a>
<p>This is a template for a simple marketing or informational website. It includes a large callout called a
jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<div class="btn-group btn-group-lg" role="group" aria-label="Basic example">
<a type="button" class="btn btn-primary" href="{% url 'admin:index' %}" role="button">Django Admin</a>
<a type="button" class="btn btn-primary" href="/api" target="_blank" role="button">Web Browseable API</a>
</div>
<div class="d-flex justify-content-center">
<img src="{% static 'vendors/images/webpack.png' %}" class="img-fluid"/>
</div>
</div>
</div>
{% endblock content %}
{% block extra_js %}
{% javascript_pack 'app' 'app2' attrs='charset="UTF-8"' %}
{% endblock %}
endef
define JENKINS_FILE
pipeline {
agent any
stages {
stage('') {
steps {
echo ''
}
}
}
}
endef
define API_AUTH
from django.conf import settings
from django.urls import include, path
from django.contrib import admin
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
from search import views as search_views
from django.contrib.auth.models import User
from rest_framework import routers, serializers, viewsets
urlpatterns = [
path('django-admin/', admin.site.urls),
path('admin/', include(wagtailadmin_urls)),
path('documents/', include(wagtaildocs_urls)),
path('search/', search_views.search, name='search'),
]
if settings.DEBUG:
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# Serve static and media files from development server
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# https://www.django-rest-framework.org/#example
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ['url', 'username', 'email', 'is_staff']
class UserViewSet(viewsets.ModelViewSet):
queryset = User.objects.all()
serializer_class = UserSerializer
router = routers.DefaultRouter()
router.register(r'users', UserViewSet)
urlpatterns = urlpatterns + [
path('api/', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]
urlpatterns = urlpatterns + [
# For anything not caught by a more specific rule above, hand over to
# Wagtail's page serving mechanism. This should be the last pattern in
# the list:
path("", include(wagtail_urls)),
# Alternatively, if you want Wagtail pages to be served from a subpath
# of your site, rather than the site root:
# path("pages/", include(wagtail_urls)),
]
endef
define REST_FRAMEWORK
REST_FRAMEWORK = {
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
]
}
endef
export HOME_PAGE
export JENKINS_FILE
export API_AUTH
export REST_FRAMEWORK
# Rules
# ------------------------------------------------------------------------------
#
# AWS Elastic Beanstalk
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# https://stackoverflow.com/a/4731504/185820
eb-check-env:
ifndef ENV_NAME
$(error ENV_NAME is undefined)
endif
ifndef INSTANCE_TYPE
$(error INSTANCE_TYPE is undefined)
endif
ifndef LB_TYPE
$(error LB_TYPE is undefined)
endif
ifndef SSH_KEY
$(error SSH_KEY is undefined)
endif
ifndef VPC_ID
$(error VPC_ID is undefined)
endif
ifndef VPC_SG
$(error VPC_SG is undefined)
endif
ifndef VPC_SUBNET_EC2
$(error VPC_SUBNET_EC2 is undefined)
endif
ifndef VPC_SUBNET_ELB
$(error VPC_SUBNET_ELB is undefined)
endif
eb-create-default: eb-check-env
eb create $(ENV_NAME) \
-i $(INSTANCE_TYPE) \
-k $(SSH_KEY) \
-p $(PLATFORM) \
--elb-type $(LB_TYPE) \
--vpc \
--vpc.id $(VPC_ID) \
--vpc.elbpublic \
--vpc.ec2subnets $(VPC_SUBNET_EC2) \
--vpc.elbsubnets $(VPC_SUBNET_ELB) \
--vpc.publicip \
--vpc.securitygroups $(VPC_SG)
eb-deploy-default:
eb deploy
eb-init-default:
eb init
#
# Django
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
django-graph-default:
python manage.py graph_models $(PROJECT_NAME) -o graph_models_$(PROJECT_NAME).png
django-loaddata-default:
python manage.py loaddata
django-migrate-default:
python manage.py migrate
django-migrations-default:
python manage.py makemigrations
git add $(PROJECT_NAME)/migrations/*.py
django-project-default:
mkdir -p $(PROJECT_NAME)/templates
touch $(PROJECT_NAME)/templates/base.html
django-admin startproject $(PROJECT_NAME) .
django-serve-default:
cd frontend; npm run watch &
python manage.py runserver 0.0.0.0:8000
django-settings-default:
echo "\n# $(PROJECT_NAME)\n" >> $(PROJECT_NAME)/$(SETTINGS)
echo "ALLOWED_HOSTS = ['*']\n" >> $(PROJECT_NAME)/$(SETTINGS)
echo "import dj_database_url, os" >> $(PROJECT_NAME)/$(SETTINGS)
echo "DATABASE_URL = os.environ.get('DATABASE_URL', \
'postgres://$(DB_USER):$(DB_PASS)@$(DB_HOST):$(DB_PORT)/$(PROJECT_NAME)')" >> $(PROJECT_NAME)/$(SETTINGS)
echo "DATABASES['default'] = dj_database_url.parse(DATABASE_URL)" >> $(PROJECT_NAME)/$(SETTINGS)
echo "INSTALLED_APPS.append('webpack_boilerplate')" >> $(PROJECT_NAME)/$(SETTINGS)
echo "INSTALLED_APPS.append('rest_framework')" >> $(PROJECT_NAME)/$(SETTINGS)
echo "STATICFILES_DIRS = [os.path.join(BASE_DIR, 'frontend/build')]" >> $(PROJECT_NAME)/$(SETTINGS)
echo "WEBPACK_LOADER = { 'MANIFEST_FILE': os.path.join(BASE_DIR, 'frontend/build/manifest.json'), }" >> \
$(PROJECT_NAME)/$(SETTINGS)
echo "$$REST_FRAMEWORK" >> $(PROJECT_NAME)/$(SETTINGS)
echo "LOGIN_REDIRECT_URL = '/'" >> $(PROJECT_NAME)/$(SETTINGS)
echo "DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'" >> $(PROJECT_NAME)/$(SETTINGS)
django-shell-default:
python manage.py shell
django-static-default:
python manage.py collectstatic --noinput
django-su-default:
python manage.py shell -c "from django.contrib.auth.models import User; \
User.objects.create_superuser('admin', '', 'admin')"
django-test-default:
python manage.py test
django-user-default:
python manage.py shell -c "from django.contrib.auth.models import User; \
User.objects.create_user('user', '', 'user')"
django-urls-default:
echo "$$API_AUTH" > $(PROJECT_NAME)/$(URLS)
django-npm-install-default:
cd frontend; npm install
#
# Git
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
gitignore-default:
echo "bin/\nlib/\nlib64\nshare/\npyvenv.cfg\n__pycache__" > .gitignore
git add .gitignore
git commit -a -m "Add .gitignore"
git push
git-branches-default:
-for i in $(GIT_BRANCHES) ; do \
git checkout -t $$i ; done
git-commit-default:
git commit -a -m $(GIT_MESSAGE)
git-commit-edit-default:
git commit -a
git-commit-push-default: git-commit git-push
git-edit-push-default: git-commit-edit git-push
git-prune-default:
git remote update origin --prune
git-push-default:
git push
git-set-upstream-default:
git push --set-upstream origin main
#
# Misc
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
black-default:
-black *.py
-black $(PROJECT_NAME)/*.py
-black $(PROJECT_NAME)/*/*.py
-git commit -a -m "A one time black event"
git push
flake-default:
-flake8 *.py
-flake8 $(PROJECT_NAME)/*.py
-flake8 $(PROJECT_NAME)/*/*.py
help-default:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F:\
'/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}'\
| sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs | tr ' ' '\n' | awk\
'{print "make "$$0}' | less # http://stackoverflow.com/a/26339924
isort-default:
-isort *.py
-isort $(PROJECT_NAME)/*.py
-isort $(PROJECT_NAME)/*/*.py
jenkins-file:
@echo "$$JENKINS_FILE" > Jenkinsfile
my-init-default:
-mysqladmin -u root drop $(PROJECT_NAME)
-mysqladmin -u root create $(PROJECT_NAME)
pdf-build-default:
rst2pdf README.rst > README.pdf
git add README.pdf
$(MAKE) commit-push
pg-init-default:
-dropdb $(PROJECT_NAME)
-createdb $(PROJECT_NAME)
python-serve-default:
@echo "\n\tServing HTTP on http://0.0.0.0:8000\n"
python -m http.server
rand-default:
@openssl rand -base64 12 | sed 's/\///g'
review-default:
ifeq ($(UNAME), Darwin)
@open -a $(REVIEW_EDITOR) `find $(PROJECT_NAME) -name \*.py | grep -v migrations`\
`find $(PROJECT_NAME) -name \*.html` `find $(PROJECT_NAME) -name \*.js`
else
@echo "Unsupported"
endif
usage-default:
@echo "Project Makefile"
@echo "Usage:\n"
@echo "\tmake <project_dir>\n"
@echo "Help:\n"
@echo "\tmake help"
make-default:
git add base.mk
git add Makefile
git commit -a -m "Add project-makefile files"
git push
init-default: gitignore make pip-init readme-init
#
# Pip
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
pip-freeze-default:
pip3 freeze | sort > $(TMPDIR)/requirements.txt
mv -f $(TMPDIR)/requirements.txt .
pip-install-default: pip-upgrade
pip3 install wheel
pip3 install -r requirements.txt
pip-install-test-default:
pip3 install -r requirements-test.txt
pip-install-upgrade-default:
cat requirements.txt | awk -F \= '{print $$1}' > $(TMPDIR)/requirements.txt
mv -f $(TMPDIR)/requirements.txt .
pip3 install -U -r requirements.txt
$(MAKE) pip-freeze
pip-upgrade:
pip3 install -U pip
pip-init-default:
touch requirements.txt
-git add requirements.txt
#
# Readme
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
readme-init-default:
@echo $(PROJECT_NAME) > README.rst
@echo "================================================================================\n" >> README.rst
@git add README.rst
git commit -a -m "Add readme"
git push
readme-edit-default:
vi README.rst
readme-open-default:
open README.pdf
readme-build-default:
rst2pdf README.rst
#
# Sphinx
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
sphinx-build-default:
sphinx-build -b html -d _build/doctrees . _build/html
sphinx-init:
$(MAKE) sphinx-install
sphinx-quickstart -q -p $(PROJECT_NAME) -a $(USER) -v 0.0.1 $(RANDIR)
mv $(RANDIR)/* .
rmdir $(RANDIR)
sphinx-install:
echo "Sphinx\n" > requirements.txt
@$(MAKE) pip-install
@$(MAKE) pip-freeze
-git add requirements.txt
sphinx-serve-default:
cd _build/html;python -m http.server
#
# Tidelift
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
tidelift-align-default:
tidelift alignment --debug
tidelift-align-save-default:
tidelift alignment save --debug
tidelift-request-all-default:
tidelift request --all --debug
#
# Wagtail
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
wagtail-init-default: db-init wagtail-install
wagtail start $(PROJECT_NAME) .
$(MAKE) pip-freeze
export SETTINGS=settings/base.py; $(MAKE) django-settings
export URLS=urls.py; $(MAKE) django-urls
-git add $(PROJECT_NAME)
-git add requirements.txt
-git add manage.py
-git add Dockerfile
-git add .dockerignore
-git add home
-git add search
@$(MAKE) django-migrate
@$(MAKE) su
@echo "$$HOME_PAGE" > home/templates/home/home_page.html
python manage.py webpack_init --skip-checks
-git add frontend
-@$(MAKE) cp
@$(MAKE) django-npm-install
-@$(MAKE) cp
@$(MAKE) isort
@$(MAKE) black
-@$(MAKE) cp
@$(MAKE) flake
@$(MAKE) serve
wagtail-install-default:
pip3 install dj-database-url djangorestframework psycopg2-binary python-webpack-boilerplate wagtail
#
# .PHONY
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# django --------------------------------------------------------------------------------
.PHONY: django-init
django-init: wagtail-init
.PHONY: loaddata
loaddata: django-loaddata
.PHONY: load
load: loaddata
.PHONY: migrate
migrate: django-migrate
.PHONY: migrations
migrations: django-migrations
.PHONY: npm-install
npm-install: django-npm-install
.PHONY: readme
readme: readme-init
.PHONY: serve
serve: django-serve
.PHONY: static
static: django-static
.PHONY: su
su: django-su
.PHONY: test
test: django-test
.PHONY: user
user: django-user
# readme --------------------------------------------------------------------------------
.PHONY: build
build: readme-build
.PHONY: b
b: build
.PHONY: edit
edit: readme-edit
.PHONY: e
e: edit
.PHONY: open
open: readme-open
.PHONY: o
o: open
# git --------------------------------------------------------------------------------
.PHONY: ce
ce: git-commit-edit git-push
.PHONY: cp
cp: git-commit-push
# pip --------------------------------------------------------------------------------
.PHONY: freeze
freeze: pip-freeze
.PHONY: install
install: pip-install
.PHONY: install-test
install-test: pip-install-test
# --------------------------------------------------------------------------------
.PHONY: db-init
db-init: pg-init
# --------------------------------------------------------------------------------
.PHONY: deploy
deploy: eb-deploy
.PHONY: d
d: deploy
# --------------------------------------------------------------------------------
.PHONY: h
h: help
# --------------------------------------------------------------------------------
.PHONY: r
r: rand
# Overrides
# ------------------------------------------------------------------------------
#
# https://stackoverflow.com/a/49804748
%: %-default
@ true