Browse Source

Improved makefile

master
Igor Zhukov 11 years ago
parent
commit
94ad95d7fe
  1. 18
      Makefile

18
Makefile

@ -1,19 +1,7 @@
bump:
sed -i.bak 's/"version": ".*",/"version": "$(version)",/g' app/manifest.json
sed -i.bak 's/"version": ".*",/"version": "$(version)",/g' app/manifest.webapp
sed -i.bak 's/<span class="settings_version">alpha .*<\/span>/<span class="settings_version">alpha $(version)<\/span>/g' app/partials/settings_modal.html
grep -rl 'Webogram v' app | xargs -I {} sed -i.bak 's/Webogram v[0-9.]*/Webogram v$(version)/g' {}
find app -name *.bak | xargs rm
package: package:
rm -rf package_dist ./node_modules/gulp/bin/gulp.js package
cp -r app package_dist find dist | grep "DS_Store" | xargs rm -rf
sed -i.bak 's/<html lang="en" ng-app="myApp">\(<\!-- ng-csp="" -->\)/<html lang="en" ng-app="myApp" ng-csp="">/g' package_dist/index.html cd dist && zip -r ../releases/webogram_v$(version).zip .
# sed -n -i.bak '1h;1!H;$${;g;s/<script>.*<\/script>/ /p;}' package_dist/index.html
rm package_dist/index.html.bak
rm package_dist/img/screenshot*
find package_dist | grep "DS_Store\|LICENSE\|README" | xargs rm -rf
cd package_dist && zip -r ../webogram_v$(version).zip .
publish: publish:
./node_modules/gulp/bin/gulp.js clean ./node_modules/gulp/bin/gulp.js clean

Loading…
Cancel
Save