-
Notifications
You must be signed in to change notification settings - Fork 1
/
post_deploy.sh
executable file
·99 lines (90 loc) · 2.74 KB
/
post_deploy.sh
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
#!/bin/bash
# --------------------------------------
echo update server
cd server
npm install
cd ..
# --------------------------------------
echo changelog
echo -n `git log --pretty=oneline|wc -l` > changelog.txt
echo " commits" >> changelog.txt
echo "------------" >> changelog.txt
git log --pretty=oneline --abbrev-commit --since "2 weeks" >> changelog.txt
mv changelog.txt unixfile.txt
perl -p -e 's/\n/\r\n/' < unixfile.txt > changelog.txt
rm unixfile.txt
# --------------------------------------
echo revision/commit
echo -n `git log -1 --pretty=format:%h` > revision.txt
# --------------------------------------
echo patching config
sed -i 's#t.console = true#t.console = false#g' conf.lua
# --------------------------------------
echo build client win
rm -rf buildtmp
mkdir buildtmp
cp localconfig.lua.dist buildtmp
cp README.md buildtmp/readme.txt
pushd buildtmp
ls *.txt | xargs -n1 todos
ls *.dist | xargs -n1 todos
popd
zip -r buildtmp.zip . -x@build_material/buildexclude.txt -x server\* -x build_material\* -x buildtmp\* -x .git\* -x build\*
mv buildtmp.zip buildtmp/game.love
cp build_material/lovewin32/* buildtmp
cat buildtmp/love.exe buildtmp/game.love > buildtmp/dastal_proto1.exe
rm buildtmp/game.love
rm buildtmp/love.exe
cp changelog.txt buildtmp
mv buildtmp dastal_proto1
zip -r dastal_proto1.zip dastal_proto1
mkdir -p build
rm -rf build/dastal_proto1
mv dastal_proto1 build
mv dastal_proto1.zip build
rm -rf buildtmp
# --------------------------------------
echo build client for mac
rm -rf buildtmp
mkdir buildtmp
cp localconfig.lua.dist buildtmp
cp README.md buildtmp/readme.txt
zip -r buildtmp.zip . -x@build_material/buildexclude.txt -x server\* -x build_material\* -x buildtmp\* -x .git\* -x build\*
mkdir -p buildtmp/combat-prototype
cd buildtmp/combat-prototype
unzip ../../buildtmp.zip
rm ../../buildtmp.zip
cd ../..
cp -r build_material/lovemacosx/* buildtmp
cp changelog.txt buildtmp
rm -rf build/combat-prototype.app
rm -rf build/osx
mkdir -p build/osx
cp -r buildtmp/* build/osx
rm -rf build/combat-prototype-osx.zip
cd build/osx
zip -r ../combat-prototype-osx.zip .
cd ../..
rm -rf buildtmp
# --------------------------------------
echo build client for linux
rm -rf buildtmp
mkdir buildtmp
cp localconfig.lua.dist buildtmp
cp README.md buildtmp/readme.txt
zip -r buildtmp.zip . -x@build_material/buildexclude.txt -x server\* -x build_material\* -x buildtmp\* -x .git\* -x build\*
mkdir -p buildtmp/combat-prototype
cd buildtmp/combat-prototype
unzip ../../buildtmp.zip
rm ../../buildtmp.zip
cd ../..
cp -r build_material/lovelinux/* buildtmp
cp changelog.txt buildtmp
rm -rf build/linux
mkdir -p build/linux
cp -r buildtmp/* build/linux
rm -rf build/combat-prototype-linux.zip
cd build/linux
zip -r ../combat-prototype-linux.zip .
cd ../..
rm -rf buildtmp