Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Preparing for first release

  • Loading branch information...
commit e3585fdd998b9732bbf7454a964260c3dc79b9ad 1 parent 6478086
@majek majek authored
Showing with 37 additions and 5 deletions.
  1. +14 −2 Makefile
  2. +17 −0 VERSION-GEN
  3. +6 −3 package.json
View
16 Makefile
@@ -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'
+
View
17 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"
View
9 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"
}
Please sign in to comment.
Something went wrong with that request. Please try again.