[Pkg-javascript-commits] [sockjs-client] 347/434: Update makefile to avoid build problems in the future

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 53475fabff8947f06e6596e1969a5a8e0f5b1a4d
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Mon Feb 13 14:11:26 2012 +0000

    Update makefile to avoid build problems in the future
---
 Makefile | 53 ++++++++++++++++++++++++++++++-----------------------
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/Makefile b/Makefile
index af58821..eed0438 100644
--- a/Makefile
+++ b/Makefile
@@ -57,6 +57,7 @@ clean:
 	rm -f sockjs*.js tests/html/lib/*.js
 
 # To release:
+#   0) 'make prepare-release'
 #   1) commit everything you need
 #   2) amend 'version' file (don't commit)
 #   3) run 'make tag', and git push/git push --tag as suggested
@@ -67,34 +68,40 @@ VER:=$(shell ./VERSION-GEN)
 # The first two dots: 1.2.3 -> 1.2
 MAJVER:=$(shell echo $(VER)|sed 's|^\([^.]\+\)[.]\([^.]\+\)[.]\([^.]\+\)[.].*$$|\1.\2|' )
 
-.PHONY: tag upload
-tag:
+.PHONY: prepare-release tag upload
+prepare-release:
 	make clean
-	-git tag -d v$(RVER)
-	git commit $(TAG_OPTS) version Changelog -m "Release $(RVER)"
-	git tag -a v$(RVER) -m "Release $(RVER)"
-	@echo ' [*] Now run'
-	@echo 'git push; git push --tag'
-
-upload: build
-	echo "Majver=$(MAJVER)"
 	[ -e ../sockjs-client-gh-pages ] || 				\
 		git clone `git remote -v|tr "[:space:]" "\t"|cut -f 2`	\
 			--branch gh-pages ../sockjs-client-gh-pages
 	(cd ../sockjs-client-gh-pages; git pull;)
-	for f in sock*js; do						\
-		cp $$f ../sockjs-client-gh-pages/`echo $$f|sed 's|\(sockjs\)\(.*[.]js\)|\1-$(VER)\2|g'`; \
-	done
-	echo "Majver=$(MAJVER)"
-	for f in sock*js; do						\
-		cp $$f ../sockjs-client-gh-pages/`echo $$f|sed 's|\(sockjs\)\(.*[.]js\)|\1-$(MAJVER)\2|g'`; \
-	done
-	for f in sock*js; do						\
-		cp $$f ../sockjs-client-gh-pages/`echo $$f|sed 's|\(sockjs\)\(.*[.]js\)|\1-latest\2|g'`; \
-	done
-	(cd ../sockjs-client-gh-pages; git add sock*js; git commit sock*js -m "Release $(VER)";)
-	(cd ../sockjs-client-gh-pages; node generate_index.js > index.html; git add index.html; git commit index.html --amend -m "Release $(VER)";)
+
+#-git tag -d v$(RVER)
+tag:
+	git commit $(TAG_OPTS) version Changelog -m "Release $(RVER)" --allow-empty
+	git tag -s v$(RVER) -m "Release $(RVER)"
+	@echo ' [*] Now run'
+	@echo 'git push; git push --tag'
+
+ARTIFACTS=\
+	sockjs-$(VER).js \
+	sockjs-$(VER).min.js \
+	sockjs-$(MAJVER).js \
+	sockjs-$(MAJVER).min.js
+
+upload: build
+	echo "VER=$(VER) MAJVER=$(MAJVER)"
+	cp sockjs.js     ../sockjs-client-gh-pages/sockjs-$(VER).js
+	cp sockjs.min.js ../sockjs-client-gh-pages/sockjs-$(VER).min.js
+	cp sockjs.js     ../sockjs-client-gh-pages/sockjs-$(MAJVER).js
+	cp sockjs.min.js ../sockjs-client-gh-pages/sockjs-$(MAJVER).min.js
+	(cd ../sockjs-client-gh-pages;	\
+		git add $(ARTIFACTS); \
+		git commit -m "Release $(VER)"; \
+		node generate_index.js > index.html; \
+		git add index.html; \
+		git commit --amend -m "Release $(VER)";)
 	@echo ' [*] Now run: '
 	@echo '(cd ../sockjs-client-gh-pages; git push; )'
 	@echo '(cd ../sockjs-client-gh-pages; 	\
-		s3cmd sync . s3://sockjs --acl-public --exclude ".*" --include index.html --include "sockjs*.js"; );'
+		s3cmd sync . s3://sockjs --acl-public --exclude ".*" --include index.html --include $(ARTIFACTS); );'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list