-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
50 lines (38 loc) · 898 Bytes
/
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
# Define variables for the build
FLUTTER = flutter
WEB_PORT = 59201
REPO = read_me_when
WEB_TARGET = ./lib/main_dev.dart
build-web:
$(FLUTTER) build web --target=$(WEB_TARGET) --release --web-renderer html
run-dev:
$(FLUTTER) run -d web-server --web-port=$(WEB_PORT) -t ./lib/main_dev.dart
clean:
@echo "Clean ..."
flutter clean
@echo "Clean Done ..."
flutter pub get
build:
@echo "Building ..."
flutter build web --release --base-href /$(REPO)/ -t ./lib/main_prod.dart
@echo "Building Done..."
deploy: clean build
@echo "Deploying the project..."
cd build/web && \
\
git init && \
\
git status && \
\
git remote add origin https://github.com/yeasin50/$(REPO).git && \
\
git checkout -b gh-pages && \
\
git add --all && \
git commit -m "update" && \
\
git push origin gh-pages -f
@echo "Deployment complete."
cd ..
cd ..
@echo "Back to the root dir"