Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New build system #176

Closed
wants to merge 110 commits into from

4 participants

@janl
Owner

This should help to make releases easier. It does the following things:

  • remove version info from source files and replaces it with a placeholder
  • adds make release version=x.y.z that replaces said placeholder
  • tags the resulting release
  • from this tag, builds all the wrappers, minifies them and the original mustache release and tars it all up individually
  • creates a new folder and page in gh-pages and appends the new release to index.html
  • woot.

Addresses #171

added some commits
@janl Released 0.5.2 d48a15d
@janl Released 0.5.3 e107929
@janl Released 0.5.5 b04c351
@janl Released 0.5.10 ec52c1a
@janl Released 0.5.11 a2fbcfb
@janl Released 0.5.12 c021674
@janl Released 0.5.13 88fbcbc
@janl add new, simpler build system eeae3fb
@janl Released 0.5.14 587baf1
@janl commit reverting of version numbers 4771ec3
@janl Released 0.5.15 8ef1985
@janl Back to non-released version d57469e
@janl Released 0.5.16 e0b91ff
@janl Back to non-released version 66f9527
@janl Released 0.5.17 f5681da
@janl Back to non-released version ed408ca
@janl Released 0.5.18 031d056
@janl Back to non-released version 660efe6
@janl create a plain mustache wrapper for distribution a4ad1fa
@janl Released 0.5.19 453653a
@janl Back to non-released version a5aafe0
@janl remove tmp files 78d75aa
@janl commit pages 902b714
@janl Released 0.5.20 6a38dbf
@janl Back to non-released version a6dafd5
@janl Released 0.5.21 6289bf4
@janl Back to non-released version 09f6adc
@janl Released 0.5.22 cea10e5
@janl Back to non-released version a9a7ee3
@janl build gh-pages index.html d4c4591
@janl Released 0.5.23 bcaefc3
@janl Back to non-released version 9bf1ab2
@janl fix index builds c50ed32
@janl Released 0.5.24 8dee8ca
@janl Back to non-released version ad170d4
@janl fix index builds 76343d3
@janl Released 0.5.25 9cd5ce1
@janl Back to non-released version 2f9974b
@janl Released 0.5.26 c6d1361
@janl Back to non-released version 93a3929
@janl fix index builds d29d2cb
@janl Released 0.5.27 c043d82
@janl Back to non-released version cfafb3e
@janl fix index builds 59cd5b0
@janl Released 0.5.28 da7210e
@janl Back to non-released version 5697d2b
@janl fix index builds 24470e6
@janl Released 0.5.29 08292ca
@janl Back to non-released version 7bc1192
@janl fix index builds f063f5a
@janl Released 0.5.30 7d25fd4
@janl Back to non-released version 8b5ea34
@janl fix index builds 1c594a5
@janl Released 0.5.31 d716cbd
@janl Back to non-released version 0ff0670
@janl fix index builds 7c92f86
@janl Released 0.5.32 31255bd
@janl Back to non-released version 36e7cdf
@janl fix index builds 6ec9428
@janl Released 0.5.33 0ecc5dd
@janl Back to non-released version da5e55b
@janl fix index builds 41e2e6c
@janl Released 0.5.34 fae6274
@janl Back to non-released version d8894f0
@janl fix index builds be9de63
@janl Released 0.5.35 c02e305
@janl Back to non-released version 767dddf
@janl fix index builds 4faf0a4
@janl Released 0.5.36 1ecce07
@janl Back to non-released version 3496cd9
@janl fix index builds 138e6c5
@janl Released 0.5.37 df3827b
@janl Back to non-released version 59295a7
@janl craete version index page 19d8673
@janl do not version wrapper directories b6e36dd
@janl Released 0.5.38 699fb38
@janl Back to non-released version 6889628
@janl strip newlines from date call 2040394
@janl Released 0.5.39 b8ba1da
@janl Back to non-released version e27e4e1
@janl strip newlines from date call f0cdf2d
@janl Released 0.5.40 a13e468
@janl Back to non-released version 3801903
@janl strip newlines from date call 520c36b
@janl Released 0.5.41 5829e54
@janl Back to non-released version 02d870b
@janl strip newlines from date call de34cf3
@janl Released 0.5.42 584e3d2
@janl Back to non-released version 9dbb916
@janl strip newlines from date call 59beae4
@janl Released 0.5.43 c99e6fb
@janl Back to non-released version 1e5f12a
@janl copy more files, depend on test 3bd9fed
@janl bundle readme/license, build tgz 21ba3cb
@janl Released 0.5.44 66a2f08
@janl Back to non-released version cc62db4
@janl list in reverse c25a743
@janl Released 0.5.45 e4e3ba9
@janl Back to non-released version ad39d99
@janl minify all the things 1c8e9bf
@janl Released 0.5.46 c3ef4d7
@janl Back to non-released version 826a894
@janl fix move e718dd5
@janl Released 0.5.47 2e73093
@janl Back to non-released version 5085c5d
@janl Released 0.5.48 216ee00
@janl Back to non-released version 1eb3996
@janl Released 0.5.49 68d2d30
@janl Back to non-released version 4826222
mustache.js
@@ -7,7 +7,7 @@ var Mustache = (typeof module !== "undefined" && module.exports) || {};
(function (exports) {
exports.name = "mustache.js";
- exports.version = "0.5.0-dev";
+ exports.version = "0.5.14";
@janl Owner
janl added a note

that is obviously wrong, lemme fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mjackson
Collaborator

I'd like to use either make or rake for all command line tasks if possible and avoid having both a Makefile and a Rakefile. Several people have said that the dependency on Ruby to build and run the tests is a little annoying, and I'm open to using make instead since it's more universal, but I'd like to use one or the other and not both.

@janl
Owner

Yeah, this is just a preview that hasn't removed rake yet.

@tmcw

Given that this was targeted for 0.5.0 and mustache.js is far beyond that, is this going to land?

@janl
Owner
@dasilvacontin
Collaborator

I will close this, if you don't mind. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 24, 2012
  1. Released 0.5.2

    authored
  2. Released 0.5.3

    authored
  3. Released 0.5.5

    authored
  4. Released 0.5.10

    authored
  5. Released 0.5.11

    authored
  6. Released 0.5.12

    authored
  7. Released 0.5.13

    authored
  8. add new, simpler build system

    authored
  9. Released 0.5.14

    authored
  10. Released 0.5.15

    authored
  11. Back to non-released version

    authored
  12. Released 0.5.16

    authored
  13. Back to non-released version

    authored
  14. Released 0.5.17

    authored
  15. Back to non-released version

    authored
  16. Released 0.5.18

    authored
  17. Back to non-released version

    authored
  18. Released 0.5.19

    authored
  19. Back to non-released version

    authored
  20. remove tmp files

    authored
  21. commit pages

    authored
  22. Released 0.5.20

    authored
  23. Back to non-released version

    authored
  24. Released 0.5.21

    authored
  25. Back to non-released version

    authored
  26. Released 0.5.22

    authored
  27. Back to non-released version

    authored
  28. build gh-pages index.html

    authored
  29. Released 0.5.23

    authored
  30. Back to non-released version

    authored
  31. fix index builds

    authored
  32. Released 0.5.24

    authored
  33. Back to non-released version

    authored
  34. fix index builds

    authored
  35. Released 0.5.25

    authored
  36. Back to non-released version

    authored
  37. Released 0.5.26

    authored
  38. Back to non-released version

    authored
  39. fix index builds

    authored
  40. Released 0.5.27

    authored
  41. Back to non-released version

    authored
  42. fix index builds

    authored
  43. Released 0.5.28

    authored
  44. Back to non-released version

    authored
  45. fix index builds

    authored
  46. Released 0.5.29

    authored
  47. Back to non-released version

    authored
  48. fix index builds

    authored
  49. Released 0.5.30

    authored
  50. Back to non-released version

    authored
  51. fix index builds

    authored
  52. Released 0.5.31

    authored
  53. Back to non-released version

    authored
  54. fix index builds

    authored
  55. Released 0.5.32

    authored
  56. Back to non-released version

    authored
  57. fix index builds

    authored
  58. Released 0.5.33

    authored
  59. Back to non-released version

    authored
  60. fix index builds

    authored
  61. Released 0.5.34

    authored
  62. Back to non-released version

    authored
  63. fix index builds

    authored
  64. Released 0.5.35

    authored
  65. Back to non-released version

    authored
  66. fix index builds

    authored
  67. Released 0.5.36

    authored
  68. Back to non-released version

    authored
  69. fix index builds

    authored
  70. Released 0.5.37

    authored
  71. Back to non-released version

    authored
  72. craete version index page

    authored
  73. Released 0.5.38

    authored
  74. Back to non-released version

    authored
  75. strip newlines from date call

    authored
  76. Released 0.5.39

    authored
  77. Back to non-released version

    authored
  78. strip newlines from date call

    authored
  79. Released 0.5.40

    authored
  80. Back to non-released version

    authored
  81. strip newlines from date call

    authored
  82. Released 0.5.41

    authored
  83. Back to non-released version

    authored
  84. strip newlines from date call

    authored
  85. Released 0.5.42

    authored
  86. Back to non-released version

    authored
  87. strip newlines from date call

    authored
  88. Released 0.5.43

    authored
  89. Back to non-released version

    authored
  90. copy more files, depend on test

    authored
  91. bundle readme/license, build tgz

    authored
  92. Released 0.5.44

    authored
  93. Back to non-released version

    authored
  94. list in reverse

    authored
  95. Released 0.5.45

    authored
  96. Back to non-released version

    authored
  97. minify all the things

    authored
  98. Released 0.5.46

    authored
  99. Back to non-released version

    authored
  100. fix move

    authored
  101. Released 0.5.47

    authored
  102. Back to non-released version

    authored
  103. Released 0.5.48

    authored
  104. Back to non-released version

    authored
  105. Released 0.5.49

    authored
  106. Back to non-released version

    authored
  107. fix version replace

    authored
This page is out of date. Refresh to see the latest.
Showing with 92 additions and 2 deletions.
  1. +68 −0 Makefile
  2. +22 −0 build/wrappers.sh
  3. +1 −1  mustache.js
  4. +1 −1  package.json
View
68 Makefile
@@ -0,0 +1,68 @@
+# Make mustaches
+
+# make a release
+release: test args tag build-wrappers
+ @echo Done!
+
+args:
+ifeq ($(version),)
+ @echo "Usage make release version=x.y.z"
+else
+ @echo "Releasing: ${version}"
+endif
+
+tag:
+ # splice in version
+ sed -i.bak -e "s|%version%|${version}|" mustache.js package.json
+ git commit -m 'Released ${version}' mustache.js package.json
+ # tag the version
+ git tag ${version}
+ # revert the version
+ sed -i.bak -e 's|exports.version = "${version}"|exports.version = "%version%"|' mustache.js
+ sed -i.bak -e 's|"version": "${version}"|"version": "%version%"|' package.json
+ git commit -m 'Back to non-released version' mustache.js package.json
+ rm *.bak
+
+build-wrappers:
+ # from that tag:
+ # build all wrappers / minify
+ git checkout $(version)
+ build/wrappers.sh $(version)
+ `echo "/*! Version: $(version) */" > mustache.min.js`
+ `uglifyjs mustache.js >> mustache.min.js`
+ mkdir wrappers/mustache-$(version)
+ cp mustache.js mustache.min.js package.json README.md LICENSE \
+ wrappers/mustache-$(version)/
+ cd wrappers; \
+ tar czf mustache-$(version).tar.gz mustache-$(version); \
+ cd ..
+ mv wrappers/mustache-$(version).tar.gz wrappers/mustache-$(version)/
+
+ git checkout gh-pages
+ mkdir ${version}
+ cp -r wrappers/mustache-* $(version)/
+ cp wrappers/mustache-$(version)/* $(version)
+ rm -rf wrappers
+
+ # update gh-pages with release links & travis
+
+ # add $(version)/index.html page (from template)
+ sed -e 's|%version%|$(version)|' \
+ -e 's|%date%|$(strip $(shell date))|' release-index.html > $(version)/index.html
+
+ # update index.html to point to $(vesion)
+ cat index.html.pre > index.html
+ for release in `ls -rp | grep '/'`; do relno=`echo $$release | sed -e 's|/||'`; echo "<li><a href=\"$${release}\">$${relno}</a></li>" >> index.html; done
+ cat index.html.post >> index.html
+ git add $(version)
+ git commit -m 'Release $(version)' index.html $(version)
+ git clean -fdx
+ git checkout new-build-system
+ # update npm
+ # update cdnjs
+
+# make test
+test:
+ rspec spec/mustache_spec.rb
+
+PHONY: test release args tag build-wrappers
View
22 build/wrappers.sh
@@ -0,0 +1,22 @@
+#!/bin/sh -ex
+if [ -z "$1" ]; then
+ echo "Usage: ./build-wrapper.sh x.y.z"
+ exit 1
+fi
+version=$1
+cd wrappers
+ for wrapper in *; do
+ target_dir="mustache-${wrapper}"
+ mkdir -p $target_dir
+ target=$target_dir/${wrapper}.mustache.js
+ touch $target
+ cat ${wrapper}/mustache.js.pre >> ${target}
+ cat ../mustache.js >> ${target}
+ cat ${wrapper}/mustache.js.post >> ${target}
+ uglifyjs ${target} > ${target_dir}/${wrapper}.mustache.min.js
+ cp ../README.md ${target_dir}
+ cp ../LICENSE ${target_dir}
+ tar czf ${target_dir}.tar.gz ${target_dir}
+ mv ${target_dir}.tar.gz ${target_dir}
+ done
+cd ..
View
2  mustache.js
@@ -7,7 +7,7 @@ var Mustache = (typeof module !== "undefined" && module.exports) || {};
(function (exports) {
exports.name = "mustache.js";
- exports.version = "0.5.0-dev";
+ exports.version = "%version%";
exports.tags = ["{{", "}}"];
exports.parse = parse;
exports.compile = compile;
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "mustache",
- "version": "0.5.0-dev",
+ "version": "%version%",
"description": "Logic-less {{mustache}} templates with JavaScript",
"author": "mustache.js Authors <http://github.com/janl/mustache.js>",
"keywords": ["mustache", "template", "templates", "ejs"],
Something went wrong with that request. Please try again.