Skip to content
Browse files

Add publish script, turn rockspec into a template.

  • Loading branch information...
1 parent bcebea2 commit faf1967344c4c99185ce89dea4cab3e623ad4620 @brimworks committed Apr 21, 2010
Showing with 38 additions and 2 deletions.
  1. +2 −2 rockspec/lua-ev-1.0-1.rockspec → lua-ev.rockspec
  2. +36 −0 publish
View
4 rockspec/lua-ev-1.0-1.rockspec → lua-ev.rockspec
@@ -1,8 +1,8 @@
package = "lua-ev"
-version = "1.0-1"
+version = "@VERSION@-1"
source = {
- url = "http://download.github.com/brimworks-lua-ev-7a4b879.tar.gz"
+ url = "http://github.com/downloads/brimworks/libev/lua-ev-@VERSION@.tar.gz"
}
description = {
View
36 publish
@@ -0,0 +1,36 @@
+#!/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-ev-$version"
+
+tmp="$TEMPDIR"
+if [ -z "$tmp" ]; then
+ tmp="$HOME/Desktop"
+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/rockspec" \
+ --exclude "$name/$(basename $0)" \
+ "$name"
+echo "Creating $tmp/$name-1.rockspec"
+cat "$src/lua-ev.rockspec" | \
+ sed s/@VERSION@/$version/ > \
+ "$name-1.rockspec"

0 comments on commit faf1967

Please sign in to comment.
Something went wrong with that request. Please try again.