zotplus-rakehelper 0.0.76 → 0.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd80c1001015e9ebc3e65873aeccd15478418440
4
- data.tar.gz: ad0c38937b659c55aa43aeb22846cc194ed6e2ef
3
+ metadata.gz: 1c3a938594f6a84d61b2d3518aaf3ff5e9f85586
4
+ data.tar.gz: 0b928c2ec0fdcc1828d35904098496131ef58a9c
5
5
  SHA512:
6
- metadata.gz: c9be3a0a66c6ba14955a4a2caf0138ba8fed97fd63196c195ab7b58a43dcc057a51e5ee5ad7149a2fe691200ea1daeb048397cdc6554a16e90de9cc26df847ba
7
- data.tar.gz: 6a96fbf103c1699745f219fafbe0b63609047a42cd9b4117389d0afcd949e306faaa612ad41c5b3b9504e683d76d1fdd19c48b843576432c55271811ac2cc748
6
+ metadata.gz: d0f06f7fac07059387c0654f756291948ecd78604fe6fc5743de5138f9212c11a755b8fdb6fc9866bb3d10c59a78c0a72ff9fbbcde26ec505d4aa9cf90e8780f
7
+ data.tar.gz: 0d4fbe299d33d5386dbe9b776d58eb9e27ab379c6862020430a027a38fcb27be153d64afc5437b63a88ac237a6bc7265c084d4e3df4bc9442d99346188d2f456
@@ -1,5 +1,5 @@
1
1
  module ZotPlus
2
2
  class RakeHelper
3
- VERSION = "0.0.76"
3
+ VERSION = "0.0.77"
4
4
  end
5
5
  end
@@ -64,10 +64,33 @@ task :bump, :what do |t, args|
64
64
  sh "git tag #{release}"
65
65
  end
66
66
 
67
- task :publish => [XPI, UPDATE_RDF] do
68
- system "git commit -am #{RELEASE}"
69
- system "git push"
70
- system "cd www; rake publish"
67
+ GR="bin/github-release"
68
+ task GR do
69
+ FileUtils.mkdir_p('bin')
70
+ FileUtils.mkdir_p('tmp')
71
+ tmp = 'tmp/github-release.tar.bz2'
72
+ ZotPlus::RakeHelper.download('https://github.com/aktau/github-release/releases/download/v0.5.3/linux-amd64-github-release.tar.bz2', tmp)
73
+ sh "tar xjf #{tmp} -C bin --strip-components 3"
74
+ end
75
+
76
+ task :deploy => [XPI, GR] do
77
+ Dir['cucumber.*.status'].each{|status|
78
+ result = open(status).read
79
+ throw "#{status}: #{result}" unless result == 'success'
80
+ }
81
+ throw "GITHUB_TOKEN not set" unless ENV['GITHUB_TOKEN']
82
+ tagged = `git log -n 1 --pretty=oneline`.strip
83
+ current = "#{ENV['CIRCLE_SHA1']} release: #{XPI}"
84
+ puts "#{RELEASE}: tagged=#{tagged}, current=#{current}"
85
+ if tagged == current
86
+ puts "Deploying #{RELEASE} (#{ENV['CIRCLE_SHA1']})"
87
+ sh "#{GR} release --user ZotPlus --repo zotero-#{EXTENSTION} --tag #{RELEASE} --name 'v#{RELEASE}'"
88
+ sh "#{GR} upload --user ZotPlus --repo zotero-#{EXTENSTION} --tag #{RELEASE} --name '#{XPI}' --file '#{XPI}'"
89
+ open("www/_includes/#{EXTENSION}-version.html", 'w'){|f| f.write(RELEASE) }
90
+ system "cd www; rake publish"
91
+ else
92
+ puts "Not a tagged release"
93
+ end
71
94
  end
72
95
 
73
96
  module ZotPlus
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.76
4
+ version: 0.0.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Heyns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-26 00:00:00.000000000 Z
11
+ date: 2015-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler