From 3947f395d3b7b71d03840182d29b0f5938501b4d Mon Sep 17 00:00:00 2001 From: Yuto Hayamizu Date: Sat, 26 Dec 2009 01:58:54 +0900 Subject: [PATCH] upload scripting in Makefile --- Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 611e3470..3054f7e7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ EMACS ?= emacs -DISTRIB_FILES = twittering-mode.el README INSTALL win-curl +DISTRIB_FILES = twittering-mode.el README NEWS INSTALL win-curl .PHONY: all check clean update-po release @@ -18,7 +18,15 @@ clean : DISTRIB_DIR = twittering-mode-$$(cat VERSION) +README: README.markdown + cp $< $@ +NEWS: NEWS.markdown + cp $< $@ release: $(DISTRIB_FILES) + @(! [ -z "$${SF_USERNAME}" ] || (echo "Environmental variable 'SF_USERNAME', which is a username of sf.net, is required."; false)) + ruby misc/vernum-updater.rb \ + --prev-version=$$(cat LAST-VERSION) --next-version=$$(cat VERSION) \ + VERSION twittering-mode.el doc/web/index.html @([ -d $(DISTRIB_DIR) ] && rm -rf $(DISTRIB_DIR)) || true mkdir $(DISTRIB_DIR) cp README.markdown $(DISTRIB_DIR)/ @@ -26,4 +34,13 @@ release: $(DISTRIB_FILES) zip -r $(DISTRIB_DIR).zip $(addprefix $(DISTRIB_DIR)/,$(DISTRIB_FILES)) tar czvf $(DISTRIB_DIR).tar.gz $(addprefix $(DISTRIB_DIR)/,$(DISTRIB_FILES)) rm -rf $(DISTRIB_DIR) + (echo "cd /home/frs/project/t/tw/twmode/"; \ + echo "-rm $(DISTRIB_DIR)/*"; \ + echo "-rmdir $(DISTRIB_DIR)"; \ + echo "mkdir $(DISTRIB_DIR)"; \ + echo "cd $(DISTRIB_DIR)"; \ + echo "put $(DISTRIB_DIR).zip"; \ + echo "put $(DISTRIB_DIR).tar.gz") > upload.bat + sftp -b upload.bat $${SF_USERNAME},twmode@web.sourceforge.net + rm -f upload.bat