Merge branch '1.9.2.x'

Conflicts:
	CHANGELOG.md
This commit is contained in:
ccd0 2014-09-14 23:26:54 -07:00
commit 60a3f66cea
2 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,7 @@ The attributions below are for work that has been incorporated into the script a
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
<!-- end notes -->
<!-- v1.9.3.x -->
### v1.9.3.0 <sup>[F](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.0/builds/4chan-X-noupdate.user.js "Firefox version") [C](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.0/builds/4chan-X-noupdate.crx "Chromium version")</sup>
*2014-09-14*
@ -18,6 +18,7 @@ Based on v1.9.2.9.
- Change name of Greasemonkey beta version to `4chan X beta` so the beta and stable versions can be installed side by side.
- Index sorting/searching/etc. features (`JSON Navigation` option) and including WebM when expanding all images (`Expand videos` option) are now on by default.
<!-- v1.9.2.x -->
### v1.9.2.9 <sup>[F](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.2.9/builds/4chan-X-noupdate.user.js "Firefox version") [C](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.2.9/builds/4chan-X-noupdate.crx "Chromium version")</sup>
*2014-09-13*

View File

@ -309,7 +309,10 @@ module.exports = (grunt) ->
filename = "/builds/#{name}#{suffix.noupdate}"
today = grunt.template.today 'yyyy-mm-dd'
changelog = grunt.file.read 'CHANGELOG.md'
[_, note, body] = changelog.match /([^]*<\!-- end notes -->\n)([^]*)/
separator = "<!-- v#{version.replace /\.\d+$/, '.x'} -->\n"
breakPos = changelog.indexOf(separator)
throw new Error 'Separator not found.' if breakPos is -1
breakPos += separator.length
grunt.file.write 'CHANGELOG.md', "#{note}#{headerPrefix} v#{version} <sup>[F](#{oldVersions}#{version}#{filename}.user.js \"Firefox version\") [C](#{oldVersions}#{version}#{filename}.crx \"Chromium version\")</sup>\n*#{today}*\n\n#{body}"
grunt.file.write 'CHANGELOG.md', "#{changelog[..breakPos-1]}#{headerPrefix} v#{version} <sup>[F](#{oldVersions}#{version}#{filename}.user.js \"Firefox version\") [C](#{oldVersions}#{version}#{filename}.crx \"Chromium version\")</sup>\n*#{today}*\n\n#{changelog[breakPos..]}"
grunt.log.ok "Changelog updated for v#{version}."