forked from pfms84/lb-gridstack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.deployment
45 lines (36 loc) · 1.06 KB
/
Makefile.deployment
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
# deployment
# BuildDist := ./dist
# BuildDoc := ./docs
# DeployTarget := ./deployment/polpware-fe-data
build:
echo "Build ..."
cp README.md ./projects/libria/gridstack/
ng build @libria/gridstack --prod
echo "Build done"
copy:
echo "Clean old files ..."
cd $(DeployTarget) && find . -path ./.git -prune -o -name "README.md" -prune -o -name ".nojekyll" -prune -o -type f -exec rm {} \;
echo "Clean old files done"
echo "Copy files ..."
cp -r $(BuildDist)/* $(DeployTarget)/
echo "Copy files done"
doc:
echo "Build doc ..."
npm run doc
echo "Build doc done"
echo "Copy doc ..."
mkdir -p $(DeployTarget)/docs
cp -r $(BuildDoc)/* $(DeployTarget)/docs/
echo "Copy doc done"
push:
echo "Find new files ..."
cd $(DeployTarget) && find . -path ./.git -prune -o -name "README.md" -prune -o -type f -exec git add {} \;
echo "Find new files done"
echo "Commit ..."
cd $(DeployTarget) && git commit -am "New publish"
echo "Commit done ..."
echo "Push ..."
cd $(DeployTarget) && git push
echo "Push done"
deploy: build copy push
.PHONY: build copy doc push deploy