forked from lipp/lua-websockets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish
More file actions
executable file
·39 lines (33 loc) · 802 Bytes
/
publish
File metadata and controls
executable file
·39 lines (33 loc) · 802 Bytes
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
#!/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)
name="lua-websockets-$version"
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.tar.gz"
tar -czvpf "$name.tar.gz" \
--dereference \
--exclude "$name/.git*" \
--exclude "$name/*.o" \
--exclude "$name/*.so" \
--exclude "$name/lua-websockets.rockspec" \
--exclude "$name/rockspecs" \
--exclude "$name/$(basename $0)" \
"$name"
echo "Creating $tmp/$name-1.rockspec"
cat "$src/lua-websockets.rockspec" | \
sed s/@VERSION@/$version/ > \
"$name-1.rockspec"