-
Notifications
You must be signed in to change notification settings - Fork 0
/
ands
executable file
·49 lines (46 loc) · 1.19 KB
/
ands
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
#!/usr/bin/env bash
proj_id=andrejevici
version=`date +%Y%m%d%H%M`
function syntax {
echo $"Usage:"
echo $"$0 run - Run development server"
echo $"$0 icons - Build icons"
echo $"$0 build - Build client"
echo $"$0 deploy - Deploy"
echo $"$0 functions - Deploy functions only"
echo $"$0 extensions - Deploy extensions only"
exit 1
}
if [ $# -eq 0 ]
then
syntax
else
# gcloud config set project $proj_id
case $1 in
run)
firebase emulators:start --import=data #--export-on-exit=data
# quasar dev -m pwa
exit ;;
icons)
inkscape --export-filename=AppIcon.png -w 2048 -h 2048 AppIcon.svg
icongenie g -i AppIcon.png --skip-trim
exit ;;
build)
# MacPorts, sudo port install gsed
gsed -i -E "/ANDREJEVICI_VERSION/s/[[:digit:]]{12}/$version/g" .env
quasar build -m pwa
exit ;;
deploy)
firebase deploy --except functions,extensions
exit ;;
functions)
firebase deploy --only functions
exit ;;
extensions)
firebase deploy --only extensions
exit ;;
*)
syntax
esac
fi
# gsutil -m setmeta -h "Cache-Control:public, max-age=604800" gs://andrejevici.appspot.com/*.jpg