You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1KB

  1. # Make mustaches
  2. # make a release
  3. release: args tag build-wrappers
  4. @echo Done!
  5. args:
  6. ifeq ($(version),)
  7. @echo "Usage make release version=x.y.z"
  8. else
  9. @echo "Releasing: ${version}"
  10. endif
  11. tag:
  12. # splice in version
  13. sed -i.bak -e "s|%version%|${version}|" mustache.js package.json
  14. git commit -m 'Released ${version}' mustache.js package.json
  15. # tag the version
  16. git tag ${version}
  17. # revert the version
  18. sed -i.bak -e 's|exports.version = "${version}"|exports.version = "%version%"|' mustache.js
  19. sed -i.bak -e 's|"version": "${version}"|"version": "%version%"|' package.json
  20. git commit -m 'Back to non-released version' mustache.js package.json
  21. build-wrappers:
  22. # from that tag:
  23. # build all wrappers / minify
  24. git checkout $(version)
  25. build/wrappers.sh $(version)
  26. git checkout gh-pages
  27. mkdir ${version}
  28. cp -r wrappers/mustache-* $(version)/
  29. cp mustache.js $(version)/
  30. cp package.json $(version)/
  31. # update gh-pages with release links & travis
  32. # update npm
  33. # update cdnjs
  34. # make test
  35. test:
  36. rspec spec/mustache_spec.rb
  37. PHONY: test release args tag build-wrappers