Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
14 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Make mustaches
  2. # make a release
  3. # TODO depend on test
  4. release: args tag build-wrappers
  5. @echo Done!
  6. args:
  7. ifeq ($(version),)
  8. @echo "Usage make release version=x.y.z"
  9. else
  10. @echo "Releasing: ${version}"
  11. endif
  12. tag:
  13. # splice in version
  14. sed -i.bak -e "s|%version%|${version}|" mustache.js package.json
  15. git commit -m 'Released ${version}' mustache.js package.json
  16. # tag the version
  17. git tag ${version}
  18. # revert the version
  19. sed -i.bak -e 's|exports.version = "${version}"|exports.version = "%version%"|' mustache.js
  20. sed -i.bak -e 's|"version": "${version}"|"version": "%version%"|' package.json
  21. git commit -m 'Back to non-released version' mustache.js package.json
  22. rm *.bak
  23. build-wrappers:
  24. # from that tag:
  25. # build all wrappers / minify
  26. git checkout $(version)
  27. build/wrappers.sh $(version)
  28. mkdir wrappers/mustache-$(version)
  29. cp mustache.js wrappers/mustache-$(version)/
  30. cp package.json wrappers/mustache-$(version)/
  31. git checkout gh-pages
  32. mkdir ${version}
  33. cp -r wrappers/mustache-* $(version)/
  34. cp wrappers/mustache-$(version)/* $(version)
  35. # update gh-pages with release links & travis
  36. # TODO: add $(version)/index.html page (from template)
  37. # update index.html to point to $(vesion)
  38. cat index.html.pre > index.html
  39. for release in `ls -p | grep '/'`; do relno=`echo $$release | sed -e 's|/||'`; echo "<li><a href=\"$${release}\">$${relno}</a></li>" >> index.html; done
  40. cat index.html.post >> index.htmlo
  41. git add $(version)
  42. git commit -m 'Release $(version)' index.html $(version)
  43. git clean -fdx
  44. git checkout new-build-system
  45. # update npm
  46. # update cdnjs
  47. # make test
  48. test:
  49. rspec spec/mustache_spec.rb
  50. PHONY: test release args tag build-wrappers