webogram-i2p/Makefile

22 lines
1.0 KiB
Makefile
Raw Normal View History

2014-02-12 17:33:31 +00:00
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
2014-02-13 15:37:20 +00:00
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
2014-02-12 17:33:31 +00:00
package:
rm -rf package_dist
cp -r app package_dist
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
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 | xargs rm -rf
cd package_dist && zip -r ../webogram_v$(version).zip .
publish:
rm -rf dist/*
2014-02-17 19:25:10 +00:00
cd dist && git pull
2014-02-12 17:33:31 +00:00
cp -r app/* dist/
2014-02-14 20:51:56 +00:00
cd dist && git add --all . && git commit -am "merged with master" && git push origin gh-pages