From 786506ecaf99ade130d984c1a495f6af53dc4df5 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 10 Aug 2014 04:20:54 -0700 Subject: [PATCH] move version number into meta --- CONTRIBUTING.md | 7 ----- Gruntfile.coffee | 38 +++++-------------------- package.json | 3 +- src/General/Globals.coffee | 2 +- src/General/html/Settings/Settings.html | 2 +- src/General/meta/banner.js | 4 +-- src/General/meta/manifest.json | 2 +- src/General/meta/metadata.js | 2 +- src/General/meta/updates.xml | 2 +- 9 files changed, 15 insertions(+), 47 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f14fc766a..50a0bfa37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,13 +25,6 @@ Reporting bugs: - Build with `grunt`. - Continuously build with `grunt watch`. -### Release - -- Update the version with `grunt patch`, `grunt minor` or `grunt major`. -- Release with `grunt release`. - -Note: this is only used to release new 4chan X versions, and is **not** needed or wanted in pull requests. - ### Contribute - Edit the sources. diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 9e5e8d4b0..37918250f 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -114,15 +114,6 @@ module.exports = (grunt) -> 'build-userscript' ] - bump: - options: - updateConfigs: [ - 'pkg' - ] - commit: false - createTag: false - push: false - shell: options: stdout: true @@ -132,24 +123,24 @@ 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 commit -am "Release <%= pkg.meta.name %> v<%= pkg.meta.version %>." + git tag -a <%= pkg.meta.version %> -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>." """ beta: command: """ - git tag -af beta -m "<%= pkg.meta.name %> v<%= pkg.version %>." + git tag -af beta -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>." git checkout gh-pages git checkout beta 'builds/*<%= pkg.meta.suffix.beta %>.*' - git commit -am "Move <%= pkg.meta.name %> v<%= pkg.version %> to beta channel." + git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to beta channel." git checkout - """ stable: command: """ - git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.version %>." + git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>." git checkout -b tmp git merge --no-commit -s ours gh-pages git checkout gh-pages 'builds/*<%= pkg.meta.suffix.beta %>.*' - git commit -am "Move <%= pkg.meta.name %> v<%= pkg.version %> to stable channel." + git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to stable channel." git checkout gh-pages git merge --ff-only tmp git branch -d tmp @@ -291,24 +282,9 @@ module.exports = (grunt) -> 'shell:push' ] - grunt.registerTask 'patch', [ - 'bump' - 'updcl:3' - ] - - grunt.registerTask 'minor', [ - 'bump:minor' - 'updcl:2' - ] - - grunt.registerTask 'major', [ - 'bump:major' - 'updcl:1' - ] - grunt.registerTask 'updcl', 'Update the changelog', (headerLevel) -> headerPrefix = new Array(+headerLevel + 1).join '#' - {version} = grunt.config 'pkg' + {version} = grunt.config('pkg').meta today = grunt.template.today 'yyyy-mm-dd' changelog = grunt.file.read 'CHANGELOG.md' diff --git a/package.json b/package.json index c910e8818..0d93efe73 100755 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "4chan-X", - "version": "1.8.8.6", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", + "version": "1.8.8.6", "repo": "https://github.com/ccd0/4chan-x/", "page": "https://github.com/ccd0/4chan-x", "downloads": "https://ccd0.github.io/4chan-x/builds/", @@ -31,7 +31,6 @@ "devDependencies": { "font-awesome": "~4.0.3", "grunt": "~0.4.4", - "grunt-bump": "0.0.14", "grunt-concurrent": "~0.5.0", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-coffee": "~0.10.1", diff --git a/src/General/Globals.coffee b/src/General/Globals.coffee index 538393b13..2f6033615 100755 --- a/src/General/Globals.coffee +++ b/src/General/Globals.coffee @@ -3,7 +3,7 @@ c = console d = document doc = d.documentElement g = - VERSION: '<%= version %>' + VERSION: '<%= meta.version %>' NAMESPACE: '<%= meta.name %>.' NAME: '<%= meta.name %>' FAQ: '<%= meta.faq %>' diff --git a/src/General/html/Settings/Settings.html b/src/General/html/Settings/Settings.html index 4f8038000..f0ae2840d 100755 --- a/src/General/html/Settings/Settings.html +++ b/src/General/html/Settings/Settings.html @@ -7,7 +7,7 @@ Reset Settings |  <%= meta.name %> |  - <%= version %> |  + <%= meta.version %> |  Issues |  diff --git a/src/General/meta/banner.js b/src/General/meta/banner.js index c67cf4a7d..ff0536171 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 @@ -77,4 +77,4 @@ * All rights reserved. * * license: https://github.com/4chan/4chan-JS/blob/master/LICENSE -*/ \ No newline at end of file +*/ diff --git a/src/General/meta/manifest.json b/src/General/meta/manifest.json index adccabb9e..6c6dbd67f 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 70b9786a4..cb7629f76 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 <%= name %> diff --git a/src/General/meta/updates.xml b/src/General/meta/updates.xml index 72cc96973..1d8ffbae8 100644 --- a/src/General/meta/updates.xml +++ b/src/General/meta/updates.xml @@ -1,7 +1,7 @@ - +