This repository has been archived by the owner on Oct 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
publish
executable file
·87 lines (79 loc) · 1.87 KB
/
publish
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
# version=$(git tag -l | tail -1)
version="0.1.4"
rev="2" # rev="1"
name="colyseus-$version-$rev"
tmp="$TEMPDIR"
if [ -z "$tmp" ]; then
tmp="$HOME"
fi
src="$(cd "$(dirname $0)" && pwd)"
cd $tmp
rm -f "$name"
ln -sf "$src" "$name"
echo "Creating $tmp/$name.src.rock"
tar -czvpf "$name.src.rock" \
--dereference \
--exclude "$name/.git*" \
--exclude "$name/*.o" \
--exclude "$name/*.so" \
--exclude "$name/colyseus.rockspec" \
--exclude "$name/rockspecs" \
--exclude "$name/server" \
--exclude "$name/coronasdk-example" \
--exclude "$name/example" \
--exclude "$name/*~" \
--exclude "$name/.DS_Store" \
--exclude "$name/publish" \
--exclude "$name/$(basename $0)" \
"$name"
echo "Creating $tmp/$name.rockspec"
cat "$src/colyseus.rockspec" | \
sed \
-e s/@VERSION@/$version/ \
-e s/@REVISION@/$rev/ > \
"$name.rockspec"
# #!/bin/sh -e
# #
# # TODO:
# #
# # * Make it generate a new version number.
# # * Set a tag in git.
# # * Generate a rockspec.
# # * Upload the tarball to github.
# # * Announce
#
# # version=$(git tag -l | tail -1)
# version=0.1.2
#
# name="colyseus-$version"
# src="$(pwd)"
# dest="$(pwd)/rockspecs"
#
# # # cd $dest
# # # rm -f "$name"
# # # ln -sf "$src" "$name"
# #
# # echo "Creating $dest/$name.tar.gz"
# # tar -czvpf "$dest/$name.tar.gz" \
# # --dereference \
# # --exclude ".git*" \
# # --exclude "*.o" \
# # --exclude "*.so" \
# # --exclude "colyseus.rockspec" \
# # --exclude "rockspecs" \
# # --exclude "server" \
# # --exclude "coronasdk-example" \
# # --exclude "example" \
# # --exclude "*~" \
# # --exclude ".DS_Store" \
# # --exclude "publish" \
# # "./"
# #
# # # $dest/
# echo "Creating $name-1.rockspec"
#
# cat "$src/colyseus.rockspec" | \
# sed s/@VERSION@/$version/ > \
# "$name-1.rockspec"
#
# luarocks pack "$name-1.rockspec"