From af61a49e29794cfd8b0462c569b8204e9062612a Mon Sep 17 00:00:00 2001 From: benweet Date: Tue, 3 Sep 2013 14:40:23 +0100 Subject: [PATCH] Release v2.0.2 --- Gruntfile.js | 22 ++++++++++++++++++++-- bower.json | 2 +- cache.manifest | 2 +- package.json | 2 +- res-min/main.js | 2 +- res/config.js | 2 +- run_deploy | 8 -------- tools/increment_version | 4 ---- tools/optimize-js.json | 19 ------------------- tools/run_optimize | 29 ----------------------------- 10 files changed, 25 insertions(+), 67 deletions(-) delete mode 100755 run_deploy delete mode 100755 tools/increment_version delete mode 100644 tools/optimize-js.json delete mode 100755 tools/run_optimize diff --git a/Gruntfile.js b/Gruntfile.js index 36fd947c..ab1c4f2c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,6 +6,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-bower-requirejs'); grunt.loadNpmTasks('grunt-bump'); + grunt.loadNpmTasks('grunt-shell'); /*************************************************************************** * Configuration @@ -157,7 +158,22 @@ module.exports = function(grunt) { ], updateConfigs: [ 'pkg' - ] + ], + commitFiles: ['-a'], + pushTo: 'origin' + } + }, + shell: { + deploy: { + options: { + stdout: true, + stderr: true, + failOnError: true + }, + command: [ + 'git branch -f gh-pages master', + 'git push --all origin' + ].join('&&') } } }); @@ -242,8 +258,10 @@ module.exports = function(grunt) { * Deploy task */ grunt.registerTask('deploy', function() { - grunt.task.run('bump-only:patch'); + grunt.task.run('bump-only'); grunt.task.run('string-replace:config'); grunt.task.run('default'); + grunt.task.run('bump-commit'); + grunt.task.run('shell'); }); }; \ No newline at end of file diff --git a/bower.json b/bower.json index b813a507..d7da88df 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "2.0.0", + "version": "2.0.2", "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "dependencies": { "bootstrap": "3.0.0", diff --git a/cache.manifest b/cache.manifest index 24cfe4d7..88d151f9 100644 --- a/cache.manifest +++ b/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Tue Sep 03 2013 13:01:08 +#Date Tue Sep 03 2013 14:40:23 CACHE: index.html diff --git a/package.json b/package.json index 77405c66..f2995057 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "2.0.1", + "version": "2.0.2", "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "main": "res/main.js", "directories": { diff --git a/res-min/main.js b/res-min/main.js index a5cab5d9..f5acbae1 100644 --- a/res-min/main.js +++ b/res-min/main.js @@ -4353,7 +4353,7 @@ printStackTrace.implementation = function() {}, printStackTrace.implementation.p }, utils; }); -var VERSION = "2.0.0", MAIN_URL = "http://benweet.github.io/stackedit/", GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1", GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", GOOGLE_SCOPES = [ "https://www.googleapis.com/auth/drive.install", "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/blogger", "https://picasaweb.google.com/data/" ], GOOGLE_DRIVE_APP_ID = "241271498917", DROPBOX_APP_KEY = "lq6mwopab8wskas", DROPBOX_APP_SECRET = "851fgnucpezy84t", BITLY_ACCESS_TOKEN = "317e033bfd48cf31155a68a536b1860013b09c4c", DEFAULT_FILE_TITLE = "Title", DEFAULT_FOLDER_NAME = "New folder", GDRIVE_DEFAULT_FILE_TITLE = "New Markdown document", CHECK_ONLINE_PERIOD = 12e4, AJAX_TIMEOUT = 3e4, ASYNC_TASK_DEFAULT_TIMEOUT = 6e4, ASYNC_TASK_LONG_TIMEOUT = 18e4, SYNC_PERIOD = 18e4, USER_IDLE_THRESHOLD = 3e5, IMPORT_FILE_MAX_CONTENT_SIZE = 1e5, IMPORT_IMG_MAX_CONTENT_SIZE = 1e7, TEMPORARY_FILE_INDEX = "file.tempIndex", WELCOME_DOCUMENT_TITLE = "Welcome document", DOWNLOAD_PROXY_URL = "http://stackedit-download-proxy.herokuapp.com/", PICASA_PROXY_URL = "http://stackedit-picasa-proxy.herokuapp.com/", WORDPRESS_CLIENT_ID = "3185", WORDPRESS_PROXY_URL = "http://stackedit-wordpress-proxy.herokuapp.com/", SSH_PROXY_URL = "http://stackedit-ssh-proxy.herokuapp.com/", delayedFunction = void 0, BASE_URL = "http://localhost/stackedit/", GOOGLE_CLIENT_ID = "241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com", GITHUB_CLIENT_ID = "e47fef6055344579799d", GATEKEEPER_URL = "http://stackedit-gatekeeper-localhost.herokuapp.com/", TUMBLR_PROXY_URL = "http://stackedit-tumblr-proxy-local.herokuapp.com/"; +var VERSION = "2.0.2", MAIN_URL = "http://benweet.github.io/stackedit/", GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1", GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", GOOGLE_SCOPES = [ "https://www.googleapis.com/auth/drive.install", "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/blogger", "https://picasaweb.google.com/data/" ], GOOGLE_DRIVE_APP_ID = "241271498917", DROPBOX_APP_KEY = "lq6mwopab8wskas", DROPBOX_APP_SECRET = "851fgnucpezy84t", BITLY_ACCESS_TOKEN = "317e033bfd48cf31155a68a536b1860013b09c4c", DEFAULT_FILE_TITLE = "Title", DEFAULT_FOLDER_NAME = "New folder", GDRIVE_DEFAULT_FILE_TITLE = "New Markdown document", CHECK_ONLINE_PERIOD = 12e4, AJAX_TIMEOUT = 3e4, ASYNC_TASK_DEFAULT_TIMEOUT = 6e4, ASYNC_TASK_LONG_TIMEOUT = 18e4, SYNC_PERIOD = 18e4, USER_IDLE_THRESHOLD = 3e5, IMPORT_FILE_MAX_CONTENT_SIZE = 1e5, IMPORT_IMG_MAX_CONTENT_SIZE = 1e7, TEMPORARY_FILE_INDEX = "file.tempIndex", WELCOME_DOCUMENT_TITLE = "Welcome document", DOWNLOAD_PROXY_URL = "http://stackedit-download-proxy.herokuapp.com/", PICASA_PROXY_URL = "http://stackedit-picasa-proxy.herokuapp.com/", WORDPRESS_CLIENT_ID = "3185", WORDPRESS_PROXY_URL = "http://stackedit-wordpress-proxy.herokuapp.com/", SSH_PROXY_URL = "http://stackedit-ssh-proxy.herokuapp.com/", delayedFunction = void 0, BASE_URL = "http://localhost/stackedit/", GOOGLE_CLIENT_ID = "241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com", GITHUB_CLIENT_ID = "e47fef6055344579799d", GATEKEEPER_URL = "http://stackedit-gatekeeper-localhost.herokuapp.com/", TUMBLR_PROXY_URL = "http://stackedit-tumblr-proxy-local.herokuapp.com/"; 0 === location.hostname.indexOf("benweet.github.io") && (BASE_URL = MAIN_URL, GOOGLE_CLIENT_ID = "241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com", GITHUB_CLIENT_ID = "fa0d09514da8377ee32e", GATEKEEPER_URL = "http://stackedit-gatekeeper.herokuapp.com/", diff --git a/res/config.js b/res/config.js index bbb5cb9f..dc0823b8 100644 --- a/res/config.js +++ b/res/config.js @@ -1,4 +1,4 @@ -var VERSION = "2.0.0"; +var VERSION = "2.0.2"; var MAIN_URL = "http://benweet.github.io/stackedit/"; var GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1"; diff --git a/run_deploy b/run_deploy deleted file mode 100755 index 92d9df82..00000000 --- a/run_deploy +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e -echo '### Optimizing resources ###' -tools/run_optimize -echo '### Commit and push ###' -git commit -a -m "Prepare deployment" -git branch -f gh-pages master -git push --all diff --git a/tools/increment_version b/tools/increment_version deleted file mode 100755 index b319dd43..00000000 --- a/tools/increment_version +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -version_minor=`sed 's/.*-\([0-9]*\)/\1/' version` -((version_minor++)) -sed -i '' "s/\(.*-\)[0-9]*/\1$version_minor/" version diff --git a/tools/optimize-js.json b/tools/optimize-js.json deleted file mode 100644 index d3af39d0..00000000 --- a/tools/optimize-js.json +++ /dev/null @@ -1,19 +0,0 @@ -// RequireJS optimizer configuration file -({ - baseUrl: "../res", - name: "main", - out: "../res-min/main.js", - mainConfigFile: '../res/main.js', - optimize: "uglify2", - uglify2: { - output: { - beautify: true, - indent_level: 1, - }, - }, - excludeShallow: [ - 'css/css-builder', - 'less/lessc-server', - 'less/lessc' - ], -}) \ No newline at end of file diff --git a/tools/run_optimize b/tools/run_optimize deleted file mode 100755 index 00f3ba65..00000000 --- a/tools/run_optimize +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -echo - -echo '### Installing dependencies ###' -npm install requirejs -npm install less -export PATH=${PATH}:`pwd`/node_modules/requirejs/bin/:`pwd`/node_modules/less/bin/ -echo - -echo '### Optimizing JavaScript ###' -rm -rf res-min -r.js -o tools/optimize-js.json -echo - -echo '### Optimizing CSS ###' -mkdir -p res-min/themes -cd res/themes -for theme in *; do lessc $theme | sed 's/@import/@import (less)/g' | lessc -x - > `echo ../../res-min/themes/${theme} | sed 's/.less$/.css/'`; done -cd ../.. -cp -R res/libs/fontello/font res-min/ -cp -R res/img res-min/ -echo - -echo '### Updating cache.manifest ###' -sed -n '1,/#dynamic/p' cache.manifest > cache.manifest.new -printf "\n# `date`\n" >> cache.manifest.new -find res-min -type f >> cache.manifest.new -printf "\nNETWORK:\n*" >> cache.manifest.new -mv cache.manifest.new cache.manifest