From f19c950efc82379d88bba3c50641e95ef453d33b Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Wed, 14 Jan 2015 21:15:47 -0700 Subject: [PATCH] Move version to pkg.meta --- Gruntfile.coffee | 9 +++++---- builds/appchan-x.user.js | 2 +- builds/crx/script.js | 2 +- src/General/meta/banner.js | 2 +- src/General/meta/manifest.json | 2 +- src/General/meta/metadata.js | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 7e2060710..27162f687 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -136,9 +136,9 @@ module.exports = (grunt) -> command: 'git checkout <%= pkg.meta.mainBranch %>' commit: command: [ - 'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."' - 'git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."' - 'git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.version %>."' + 'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.meta.version %>."' + 'git tag -a <%= pkg.meta.version %> -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."' + 'git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>."' ].join " && " push: command: 'git push origin --tags -f && git push origin --all' @@ -249,7 +249,8 @@ module.exports = (grunt) -> grunt.registerTask 'updcl', 'Update the changelog', (headerLevel) -> headerPrefix = new Array(+headerLevel + 1).join '#' - {version} = grunt.config 'pkg' + {meta} = grunt.config 'pkg' + {version} = meta today = grunt.template.today 'yyyy-mm-dd' changelog = grunt.file.read 'CHANGELOG.md' diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 3d511cad0..01049d7b6 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -502,7 +502,7 @@ doc = d.documentElement; g = { - VERSION: '', + VERSION: '2.10.2', NAMESPACE: 'appchan_x.', NAME: 'appchan x', FAQ: 'https://github.com/zixaphir/appchan-x/wiki/Frequently-Asked-Questions', diff --git a/builds/crx/script.js b/builds/crx/script.js index e393f1d3c..e38c883ec 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -474,7 +474,7 @@ doc = d.documentElement; g = { - VERSION: '', + VERSION: '2.10.2', NAMESPACE: 'appchan_x.', NAME: 'appchan x', FAQ: 'https://github.com/zixaphir/appchan-x/wiki/Frequently-Asked-Questions', diff --git a/src/General/meta/banner.js b/src/General/meta/banner.js index 7ece3c57d..56e9d6ef3 100755 --- a/src/General/meta/banner.js +++ b/src/General/meta/banner.js @@ -1,5 +1,5 @@ /* -* <%= meta.name %> - Version <%= version %> - <%= grunt.template.today('yyyy-mm-dd') %> +* <%= meta.name %> - Version <%= meta.version %> - <%= grunt.template.today('yyyy-mm-dd') %> * * Licensed under the MIT license. * <%= meta.repo %>blob/master/LICENSE diff --git a/src/General/meta/manifest.json b/src/General/meta/manifest.json index cb022ecea..914951b5c 100755 --- a/src/General/meta/manifest.json +++ b/src/General/meta/manifest.json @@ -1,6 +1,6 @@ { "name": "<%= meta.name %>", - "version": "<%= version %>", + "version": "<%= meta.version %>", "manifest_version": 2, "description": "<%= description %>", "icons": { diff --git a/src/General/meta/metadata.js b/src/General/meta/metadata.js index e0409e26f..019f0271b 100755 --- a/src/General/meta/metadata.js +++ b/src/General/meta/metadata.js @@ -1,6 +1,6 @@ // ==UserScript== // @name <%= meta.name %> -// @version <%= version %> +// @version <%= meta.version %> // @minGMVer <%= meta.min.greasemonkey %> // @minFFVer <%= meta.min.firefox %> // @namespace <%= meta.namespace %>