separate branches to make changelog merges easier
This commit is contained in:
parent
af34358bfc
commit
26f32f6658
@ -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).
|
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.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>
|
### 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*
|
*2014-09-13*
|
||||||
|
|
||||||
|
|||||||
@ -309,7 +309,10 @@ module.exports = (grunt) ->
|
|||||||
filename = "/builds/#{name}#{suffix.noupdate}"
|
filename = "/builds/#{name}#{suffix.noupdate}"
|
||||||
today = grunt.template.today 'yyyy-mm-dd'
|
today = grunt.template.today 'yyyy-mm-dd'
|
||||||
changelog = grunt.file.read 'CHANGELOG.md'
|
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}."
|
grunt.log.ok "Changelog updated for v#{version}."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user