This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
209 lines (184 loc) · 6.93 KB
/
Makefile
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
# -----------------------------------------------------------------------------
# MAKEFILE RUNNING COMMAND
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni (@zeroc0d3)
# License : Apache version 2
# -----------------------------------------------------------------------------
# Notes:
# use [TAB] instead [SPACE]
export PATH_WORKSPACE="./src"
export PATH_DOCKER="./docker"
export PATH_SCRIPTS="./scripts/installer/"
export PROJECT_NAME="laravel"
run-docker:
@echo "============================================"
@echo " Task : Docker Container "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_DOCKER} && ./run-docker.sh
@echo '- DONE -'
stop-docker:
@echo "============================================"
@echo " Task : Stopping Docker Container "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_DOCKER} && docker-compose -f ./compose/app-compose.yml stop
@echo '- DONE -'
remove-docker:
@echo "============================================"
@echo " Task : Remove Docker Container "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_DOCKER} && docker-compose -f ./compose/app-compose.yml down
@echo '- DONE -'
composer-install:
@echo "============================================"
@echo " Task : Composer Install "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && composer install
@echo '- DONE -'
composer-update:
@echo "============================================"
@echo " Task : Composer Update "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && composer update
@echo '- DONE -'
composer-dumpautoload:
@echo "============================================"
@echo " Task : Composer Dump Autoload "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && composer dumpautoload -o
@echo '- DONE -'
composer-selfupdate:
@echo "============================================"
@echo " Task : Composer Update "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && composer self-update
@echo '- DONE -'
key-generate:
@echo "============================================"
@echo " Task : Generate Key "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan key:generate
@echo '- DONE -'
clear-view:
@echo "============================================"
@echo " Task : Clear Compiled Views "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan view:clear
@echo '- DONE -'
clear-cache:
@echo "============================================"
@echo " Task : Clear Application Cache "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan cache:clear
@echo '- DONE -'
clear-config:
@echo "============================================"
@echo " Task : Clear Configuration Cache "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan config:clear
@echo '- DONE -'
clear-event:
@echo "============================================"
@echo " Task : Clear Cached Event "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan event:clear
@echo '- DONE -'
clear-debug:
@echo "============================================"
@echo " Task : Clear Debugbar Storage "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan debug:clear
@echo '- DONE -'
clear-all:
@echo "============================================"
@echo " Task : Clear All Cache "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan view:clear
@cd ${PATH_WORKSPACE} && php artisan cache:clear
@cd ${PATH_WORKSPACE} && php artisan config:clear
@cd ${PATH_WORKSPACE} && php artisan event:clear
@cd ${PATH_WORKSPACE} && php artisan debug:clear
@echo '- DONE -'
fixing-cache:
@echo "============================================"
@echo " Task : Fixing Cache Path"
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && for i in {'sessions','views','cache'}; do mkdir -p storage/framework/$i; done
@echo '- DONE -'
run-migrate:
@echo "============================================"
@echo " Task : Running Artisan Migrate "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan migrate
@echo '- DONE -'
run-seed:
@echo "============================================"
@echo " Task : Running Artisan Seed "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan db:seed
@echo '- DONE -'
run-migrate-all:
@echo "============================================"
@echo " Task : Running Artisan Migrate & Seed "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan migrate:install && php artisan migrate --seed
@echo '- DONE -'
run-npm:
@echo "============================================"
@echo " Task : Running NPM Install "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && npm install
@echo '- DONE -'
run-yarn:
@echo "============================================"
@echo " Task : Running YARN Install "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && yarn install
@echo '- DONE -'
run-mix-dev:
@echo "============================================"
@echo " Task : Running Mix Develop "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && npm run dev
@echo '- DONE -'
run-mix-prod:
@echo "============================================"
@echo " Task : Running Mix Production "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && npm run production
@echo '- DONE -'
run-mix-watch:
@echo "============================================"
@echo " Task : Running Mix Watch "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && npm run watch
@echo '- DONE -'
run-project:
@echo "============================================"
@echo " Task : Running Project "
@echo " Date/Time : `date`"
@echo "============================================"
@cd ${PATH_WORKSPACE} && php artisan serve --port=8080
@echo '- DONE -'