提交 f87ae424 编写于 作者: K kohsuke

wrote a new changelog update script


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3893 71c3de6d-444a-0410-be80-ed276b4c234a
上级 edc88877
......@@ -23,5 +23,5 @@ perl -p -i.bak -e "s|https://.+hudson\.jar|$jarUrl|" $WWW/hudson.jnlp
cp $WWW/hudson.jnlp $WWW/$id.jnlp
# update changelog.html
perl -n -i.bak -e "print unless /=END=.+/" $WWW/changelog.html
perl -n -i.bak -e 'print; print "<a name=v$id><h3>What'\''s new in 1.$id</h3></a>\n<ul class=image>\n <li class=>\n</ul>\n=END=-->\n" if /=BEGIN=/' $WWW/changelog.html
ruby update.changelog.rb $id < $WWW/changelog.html > $WWW/changelog.new
mv $WWW/changelog.new $WWW/changelog.html
#!/bin/ruby
# Updates changelog.html
# Usage: update.changelog.rb <nextVer> < changelog.html > output.html
id=ARGV.shift
ARGF.each do |line|
if /=BEGIN=/ =~ line
puts line
puts "<a name=v#{id}><h3>What's new in 1.#{id}</h3></a>"
puts "<ul class=image>"
puts " <li class=>"
puts "</ul>"
puts "</div><!--=END=-->"
next
end
if /=END=/ =~ line
next
end
puts line
end
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册