Update feed updater script
This commit is contained in:
parent
e8ff4a9b63
commit
e9e446e1a2
1 changed files with 6 additions and 16 deletions
|
@ -21,6 +21,8 @@ appcast_url = appcast_enclosure.attributes['url'];
|
||||||
appcast_revision = appcast_enclosure.attributes['sparkle:version'];
|
appcast_revision = appcast_enclosure.attributes['sparkle:version'];
|
||||||
appcast_revision_split = appcast_revision.split( /-/ )
|
appcast_revision_split = appcast_revision.split( /-/ )
|
||||||
appcast_revision_code = appcast_revision_split[2]
|
appcast_revision_code = appcast_revision_split[2]
|
||||||
|
appcast_revision_split = appcast_revision_code.split( /g/ )
|
||||||
|
appcast_revision_code = appcast_revision_split[1]
|
||||||
|
|
||||||
#Remove modified files that may cause conflicts.
|
#Remove modified files that may cause conflicts.
|
||||||
#%x[hg revert --all]
|
#%x[hg revert --all]
|
||||||
|
@ -47,26 +49,14 @@ appcast_revision_code = appcast_revision_split[2]
|
||||||
#latest_revision = %x[/usr/local/bin/hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}']
|
#latest_revision = %x[/usr/local/bin/hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}']
|
||||||
revision_split = latest_revision.split( /-/ )
|
revision_split = latest_revision.split( /-/ )
|
||||||
revision_code = revision_split[2]
|
revision_code = revision_split[2]
|
||||||
|
revision_split = revision_code.split( /g/ )
|
||||||
|
revision_code = revision_split[1]
|
||||||
|
|
||||||
if appcast_revision < latest_revision
|
if appcast_revision < latest_revision
|
||||||
#Get the changelog
|
#Get the changelog
|
||||||
changelog = %x[/usr/local/bin/hg log --template '{desc}\\n' -r #{revision_code}:children\\(#{appcast_revision_code}\\)]
|
changelog = %x[/usr/bin/git shortlog #{appcast_revision_code}..#{revision_code}]
|
||||||
|
|
||||||
description = ''
|
description = changelog
|
||||||
ignore_next = false
|
|
||||||
changelog.each_line do |line|
|
|
||||||
if (ignore_next)
|
|
||||||
ignore_next = false
|
|
||||||
next
|
|
||||||
end
|
|
||||||
if Regexp.new('^-+$').match(line)
|
|
||||||
ignore_next = true
|
|
||||||
next
|
|
||||||
elsif Regexp.new('^\s*$').match(line)
|
|
||||||
next
|
|
||||||
end
|
|
||||||
description += line
|
|
||||||
end
|
|
||||||
|
|
||||||
filename = "Cog-#{revision_code}.zip"
|
filename = "Cog-#{revision_code}.zip"
|
||||||
filename_delta = "Cog-#{revision_code}.delta"
|
filename_delta = "Cog-#{revision_code}.delta"
|
||||||
|
|
Loading…
Reference in a new issue