Skip to content

Commit

Permalink
Preparing for first release
Browse files Browse the repository at this point in the history
  • Loading branch information
majek committed Aug 11, 2011
1 parent 6478086 commit e3585fd
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
16 changes: 14 additions & 2 deletions Makefile
Expand Up @@ -5,7 +5,19 @@ all: src/*coffee

serve:
@while [ 1 ]; do \
make all; \
inotifywait -r -q -e modify .; \
make all; \
inotifywait -r -q -e modify .; \
sleep 0.1; \
done

RVER:=$(shell grep "version" package.json|tr '\t"' ' \t'|cut -f 4)
VER:=$(shell ./VERSION-GEN)

.PHONY: tag
tag: all
-git tag -d v$(RVER)
git commit package.json -m "Release $(RVER)"
git tag -a v$(RVER) -m "Release $(RVER)"
@echo ' [*] Now run'
@echo 'git push; git push --tag'

17 changes: 17 additions & 0 deletions VERSION-GEN
@@ -0,0 +1,17 @@
#!/bin/sh

LF='
'

VN=$(git describe --match "v[0-9]*" --abbrev=4 HEAD 2>/dev/null)
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*)
git update-index -q --refresh
test -z "$(git diff-index --name-only HEAD --)" ||
VN="$VN-dirty" ;;
esac
VN=$(echo "$VN" | sed -e 's/-/./g');
VN=$(expr "$VN" : v*'\(.*\)')

echo "$VN"
9 changes: 6 additions & 3 deletions package.json
@@ -1,10 +1,13 @@
{
"name": "sockjs",
"version": "0.0.1",
"name": "sockjs",
"author": "Marek Majkowski",
"version": "0.0.0-rc1",
"repository": {"type": "git",
"url": "https://github.com/majek/sockjs-client.git"},
"dependencies": {
"coffee-script": "1.1.1",
"jquery": "1.5.1",
"node-uuid": "1.2.0"
},
"main": "index"
"main": "index"
}

0 comments on commit e3585fd

Please sign in to comment.