瀏覽代碼

Update Makefile to auto-bump version number

JC Brand 11 年之前
父節點
當前提交
7922f17a79
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      Makefile

+ 9 - 1
Makefile

@@ -40,9 +40,17 @@ pot:
 merge:
 merge:
 	find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \;
 	find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \;
 
 
+bump:
+	sed -i s/\"version\":\ \"[0-9]\.[0-9]\.[0-9]\"/\"version\":\ \"$(VERSION)\"/ bower.json
+	sed -i s/\"version\":\ \"[0-9]\.[0-9]\.[0-9]\"/\"version\":\ \"$(VERSION)\"/ package.json
+	sed -i s/v[0-9]\.[0-9]\.[0-9]\.zip/v$(VERSION)\.zip/ index.html
+	sed -i s/v[0-9]\.[0-9]\.[0-9]\.tar\.gz/v$(VERSION)\.tar\.gz/ index.html
+	sed -i s/version\ =\ \'[0-9]\.[0-9]\.[0-9]\'/version\ =\ \'$(VERSION)\'/ docs/source/conf.py
+	sed -i s/release\ =\ \'[0-9]\.[0-9]\.[0-9]\'/release\ =\ \'$(VERSION)\'/ docs/source/conf.py
+	sed -i "s/^[0-9]\.[0-9]\.[0-9]\ \(Unreleased\)/$(VERSION)\ (`date +%Y-%m-%d`)/" CHANGES.rst
 
 
 release: 
 release: 
-	r.js -o build.js
+	r.js -o build.js && grunt cssmin
 
 
 clean:
 clean:
 	-rm -rf $(BUILDDIR)/*
 	-rm -rf $(BUILDDIR)/*