zotplus-rakehelper 0.0.141 → 0.0.142

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27492983c801f104cc08b51585ae12a7c778e7ce
4
- data.tar.gz: a0960849867f2cc4b2a6dc91aa4fa24bd2bc5726
3
+ metadata.gz: 574b6737a3411e84f772f3b4c748f9cee47b1d93
4
+ data.tar.gz: 8491cedd4fda7755d6d71cb0087073bef6b6ac16
5
5
  SHA512:
6
- metadata.gz: c107912e9597cfb75e32f01d4cf14b10b95f12a0651f7a00ee8e1b9aeaac0d39c23333677b67229bb0ebc3c124341746adad9bf7c5fcb70a54533333dadd1b0a
7
- data.tar.gz: 4b78f0c7686704ab6da6bb82f71cc2d0dfdd8c528656fb7ce0adeca01b239da08dfce99b0eb5d94d55914c7e1c7eb7232e6398b2d6539043d501e0fddf5d2038
6
+ metadata.gz: db435345e00264c84f7706d1ca4af16b507fb035341c4f3746edb7d98d5a89ecc20d589bd6b52a474c75ef942aba6f02a45c64a95ba50c34a88c2eaf38b862a6
7
+ data.tar.gz: b5b846a0bb50a42cab6f1ea58485d3408418c89b235dfc8cb267ea67dc192fa5d2b8e3bd6c0d0fc083fb3ff35fb895e06e7c0c27f3026928df5e10a2a8d96c34
@@ -1,5 +1,5 @@
1
1
  module ZotPlus
2
2
  class RakeHelper
3
- VERSION = "0.0.141"
3
+ VERSION = "0.0.142"
4
4
  end
5
5
  end
@@ -85,25 +85,34 @@ task :bump, :what do |t, args|
85
85
  end
86
86
  release = release.collect{|n| n.to_s}.join('.')
87
87
 
88
- install_rdf = Nokogiri::XML(File.open('install.rdf'))
89
- install_rdf.at('//em:version').content = release
90
- File.open('install.rdf','w') {|f| install_rdf.write_xml_to f}
91
-
92
- md = open("https://raw.githubusercontent.com/ZotPlus/ZotPlus.github.io/master/#{EXTENSION}/index.md").read
93
- md.sub!(/^---(.|\n)+---\n/, '')
94
- md.gsub!(/{% include ([^\s]+) %}/){ release }
88
+ ## README.MD
89
+ config = YAML.load_file('site/_config.yml')
90
+ md = open('site/index.md').read
91
+ md.sub!(/^---(.|\n)+---\n/, '') # remove yaml header
95
92
  md.gsub!(/\[([^!\]]+)\]\(([^\)]+)\)/) {
96
93
  title = $1
97
94
  url = $2
98
- url = "/#{EXTENSION}/#{url}" unless url =~ /^https?:/ || url =~ /^\//
99
- url = "https://zotplus.github.io#{url}" unless url =~ /^https?:/
95
+ url = "/#{url}" unless url =~ /^https?:/ || url =~ /^\//
96
+ url = "#{config['url']}#{url}" unless url =~ /^https?:/
100
97
  "[#{title}](#{url})"
101
98
  }
102
99
  open('README.md', 'w'){|f| f.write(md) }
103
100
 
104
- sh "git add install.rdf README.md"
101
+ ## INSTALL.RDF
102
+ install_rdf = Nokogiri::XML(File.open('install.rdf'))
103
+ install_rdf.at('//em:version').content = release
104
+ File.open('install.rdf','w') {|f| install_rdf.write_xml_to f}
105
+
106
+ ## UPDATE.RDF
107
+ update = Nokogiri::XML(open('site/update.rdf'))
108
+ update.at('//em:version').content = release
109
+ update.xpath('//em:updateLink').each{|link| link.content = "https://github.com/ZotPlus/zotero-#{EXTENSION}/releases/download/#{release}/zotero-#{EXTENSION}-#{release}.xpi" }
110
+ open('site/update.rdf', 'w'){|f| update.write_xml_to f }
111
+
112
+ sh "git add site install.rdf README.md"
105
113
  sh "git commit -m 'release: zotero-#{EXTENSION}-#{release}.xpi'"
106
114
  sh "git tag #{release}"
115
+ sh "git subtree push --prefix site/ origin gh-pages"
107
116
  end
108
117
 
109
118
  def sign
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zotplus-rakehelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.141
4
+ version: 0.0.142
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Heyns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-07 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler