mercure 0.1.5 → 0.1.7

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: bc4f122febfd18aa0440e5420ff98cbc691e98f8
4
- data.tar.gz: bedbf5c4fed43af951be5b19f05762b606ea8290
3
+ metadata.gz: c12678fd71e25fed2ff31a2a56d85aa86f4bd38b
4
+ data.tar.gz: 2b5cfd2f9d83cf652b60337d03a31468aacf860e
5
5
  SHA512:
6
- metadata.gz: 07b530e01c9b6764440082933dfcb8899ac1c78b00caf9415d8210bb3951c49d95f5aa5bbd7310e323a18601ca2a8982c21cbe0fa219245ea6b490cc9d2aed71
7
- data.tar.gz: 5ca844fcfbedf17936abf88b45a25631a7300d0c731721bf0633823171e5c2e974682c23de61847daf122627523298dd725412aa3e4d13742acd2760d1661dcf
6
+ metadata.gz: 1041e270dc534d2812ed9966c4190314384395a08089fe3295ce9cfaf76b1e55fe97cd29192efad27be486c0ed2a349b4f963683a49519364c19df2a07a27e48
7
+ data.tar.gz: bb5bbf9c83e8ba75d30cbe73b4ec659f8ff4251a1c775e0cb1a83ecae6ef35a580919ed94c04cd4e2c98e30d17356bbf9840dc0f035acb533c5dd00f1c61b79f
@@ -59,12 +59,12 @@ module Mercure
59
59
  end
60
60
  end
61
61
 
62
- # desc "changelog JOB", "will build, upload and deploy the job"
63
- # option :p, :type => :boolean
64
- # option :pinailleur, :type => :boolean
65
- # def changelog(plist)
66
- # generateChangelogs plist
67
- # end
62
+ desc "changelog JOB", "will build, upload and deploy the job"
63
+ option :p, :type => :boolean
64
+ option :pinailleur, :type => :boolean
65
+ def changelog(plist)
66
+ generateChangelogs plist
67
+ end
68
68
 
69
69
  end
70
70
 
@@ -7,36 +7,33 @@ require 'cfpropertylist'
7
7
 
8
8
  require_relative 'paths.rb'
9
9
 
10
- # def generateChangelogs (plist_path)
11
- #
12
- # plist_content = CFPropertyList::List.new(file: plist_path)
13
- # deployments = CFPropertyList.native_types(plist_content.value)
14
- #
15
- # deployments.each do |deploy|
16
- #
17
- # generateChangelog deploy
18
- #
19
- # end
20
- #
21
- # end
22
-
23
-
24
- # def generateChangelog (deploy)
25
- #
26
- # settings = load_settings deploy
27
- # changelogPath = changelogPath(settings)
28
- # previousTag = settings[:deploy]["build"]["previousGitTag"]
29
- # currentTag = settings[:deploy]["build"]["currentGitTag"]
30
- #
31
- # if previousTag.nil? || currentTag.nil?
32
- # return
33
- #
34
- # name = 'mercure'
35
- # g = Gem::Specification.find_by_name( name )
36
- # script_path = File.join( g.full_gem_path, 'lib/mercure/changelog.sh' )
37
- #
38
- # puts "#{script_path} #{previousTag} #{currentTag} #{changelogPath}"
39
- #
40
- # system("#{script_path} #{previousTag} #{currentTag} #{changelogPath}")
41
- #
42
- # end
10
+ def generateChangelogs (plist_path)
11
+
12
+ plist_content = CFPropertyList::List.new(file: plist_path)
13
+ deployments = CFPropertyList.native_types(plist_content.value)
14
+
15
+ deployments.each do |deploy|
16
+
17
+ generateChangelog deploy
18
+
19
+ end
20
+
21
+ end
22
+
23
+
24
+ def generateChangelog (deploy)
25
+
26
+ settings = load_settings deploy
27
+ changelogPath = changelogPath(settings)
28
+ previousTag = settings[:deploy]["build"]["previousGitTag"]
29
+ currentTag = settings[:deploy]["build"]["currentGitTag"]
30
+
31
+ name = 'mercure'
32
+ g = Gem::Specification.find_by_name( name )
33
+ script_path = File.join( g.full_gem_path, 'lib/mercure/changelog.sh' )
34
+
35
+ puts "#{script_path} #{previousTag} #{currentTag} #{changelogPath}"
36
+
37
+ system("#{script_path} #{previousTag} #{currentTag} #{changelogPath}")
38
+
39
+ end
@@ -227,7 +227,9 @@ end
227
227
  def buildArtefacts (xcode_settings)
228
228
  generateIpa xcode_settings
229
229
  generatePlist xcode_settings
230
- # generateChangelog xcode_settings
230
+
231
+ # the following line has been commented in order to make it work on Xcode 7
232
+ # generateChangelog xcode_settings
231
233
  end
232
234
 
233
235
  # def unlock_keychain
@@ -29,7 +29,7 @@ def updateParse (settings)
29
29
  appVersion["versionChangeLog"] = parseInfos["versionChangeLog"]
30
30
  appVersion["versionLevel"] = parseInfos["versionLevel"].to_i
31
31
  appVersion["versionUrl"] = publicPlistURL settings
32
- #appVersion["changelogUrl"] = publicChangelogURL settings
32
+ appVersion["changelogUrl"] = publicChangelogURL settings
33
33
 
34
34
  result = appVersion.save
35
35
 
@@ -159,48 +159,48 @@ end
159
159
  # IPA
160
160
  #
161
161
 
162
- # def changelogName (settings)
163
- #
164
- # buildDirectory = settings[:buildDirectory]
165
- # buildConfiguration = settings[:buildConfiguration]
166
- # buildNumber = settings[:buildNumber]
167
- # applicationName = settings[:applicationName]
168
- #
169
- # pjServerConf = settings[:deploy]["infosPlist"]["PJServerConf"]
170
- #
171
- # "changelog.#{applicationName}.#{buildNumber}.html"
172
- #
173
- # end
162
+ def changelogName (settings)
174
163
 
175
- # def changelogPath (settings)
176
- #
177
- # buildDirectory = settings[:buildDirectory]
178
- # buildConfiguration = settings[:buildConfiguration]
179
- # buildNumber = settings[:buildNumber]
180
- # applicationName = settings[:applicationName]
181
- # changelogName = changelogName(settings)
182
- #
183
- # "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{changelogName}"
184
- #
185
- # end
164
+ buildDirectory = settings[:buildDirectory]
165
+ buildConfiguration = settings[:buildConfiguration]
166
+ buildNumber = settings[:buildNumber]
167
+ applicationName = settings[:applicationName]
168
+
169
+ pjServerConf = settings[:deploy]["infosPlist"]["PJServerConf"]
186
170
 
187
- # def remoteChangelogPath (settings , destination)
188
- #
189
- # changelogName = changelogName(settings)
190
- # remotePath = destination["path"]
191
- #
192
- # "#{remotePath}/#{changelogName}"
193
- #
194
- # end
171
+ "changelog.#{applicationName}.#{buildNumber}.html"
172
+
173
+ end
195
174
 
196
- # def publicChangelogURL (settings)
197
- #
198
- # publicURL = settings[:deploy]["uploadServer"]["plist"][0]["publicURL"]
199
- # changelogName = changelogName (settings)
200
- #
201
- # "#{publicURL}/#{changelogName}"
202
- #
203
- # end
175
+ def changelogPath (settings)
176
+
177
+ buildDirectory = settings[:buildDirectory]
178
+ buildConfiguration = settings[:buildConfiguration]
179
+ buildNumber = settings[:buildNumber]
180
+ applicationName = settings[:applicationName]
181
+ changelogName = changelogName(settings)
182
+
183
+ "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{changelogName}"
184
+
185
+ end
186
+
187
+ def remoteChangelogPath (settings , destination)
188
+
189
+ changelogName = changelogName(settings)
190
+ remotePath = destination["path"]
191
+
192
+ "#{remotePath}/#{changelogName}"
193
+
194
+ end
195
+
196
+ def publicChangelogURL (settings)
197
+
198
+ publicURL = settings[:deploy]["uploadServer"]["plist"][0]["publicURL"]
199
+ changelogName = changelogName (settings)
200
+
201
+ "#{publicURL}/#{changelogName}"
202
+
203
+ end
204
204
 
205
205
  #
206
206
  # Extra
@@ -9,7 +9,7 @@ require_relative 'paths.rb'
9
9
 
10
10
  def generatePlist (settings)
11
11
 
12
- puts "Creation du plist"
12
+ puts "--> Creation du plist"
13
13
 
14
14
  buildConfiguration = settings[:buildConfiguration]
15
15
  buildDirectory = settings[:buildDirectory]
@@ -23,22 +23,24 @@ def generatePlist (settings)
23
23
  items = Array.new
24
24
  item = Hash.new
25
25
 
26
+ assets = Array.new
26
27
 
27
- assets = Array.new
28
- asset = Hash.new
28
+ asset = Hash.new
29
29
  asset['kind'] = 'software-package'
30
-
31
30
  asset['url'] = settings[:deploy]["uploadServer"]["ipa"][0]["publicURL"] + "/" + ipaName(settings)
32
31
 
33
32
  assets.push asset
34
33
 
35
- metadata = Hash.new
36
- metadata['bundle-identifier'] = settings[:deploy]["infosPlist"]["CFBundleIdentifier"] + ".iOS8"
34
+ metadata = Hash.new
35
+
36
+ # the following line has been commented and replaced by th next one in order to make it work on iOS 9...
37
+ # metadata['bundle-identifier'] = settings[:deploy]["infosPlist"]["CFBundleIdentifier"] + ".iOS8"
38
+ metadata['bundle-identifier'] = settings[:deploy]["infosPlist"]["CFBundleIdentifier"]
37
39
  metadata['bundle-version'] = projectInfos['CFBundleVersion']
38
40
  metadata['subtitle'] = 'by SoLocal'
39
41
  metadata['title'] = settings[:deploy]["infosPlist"]["CFBundleDisplayName"]
40
42
  metadata['kind'] = 'software'
41
-
43
+
42
44
  item['assets'] = assets
43
45
  item['metadata'] = metadata
44
46
 
@@ -71,20 +71,20 @@ def uploadPlist(settings)
71
71
 
72
72
  end
73
73
 
74
- # def uploadChangelog(settings)
75
- #
76
- # settings[:deploy]["uploadServer"]["plist"].each do |destination|
77
- #
78
- # changelogPath = changelogPath (settings)
79
- # remoteChangelogPath = remoteChangelogPath (settings , destination)
80
- #
81
- # files_to_upload = [[changelogPath , remoteChangelogPath]]
82
- #
83
- # uploadFiles(settings , destination , files_to_upload)
84
- #
85
- # end
86
- #
87
- # end
74
+ def uploadChangelog(settings)
75
+
76
+ settings[:deploy]["uploadServer"]["plist"].each do |destination|
77
+
78
+ changelogPath = changelogPath (settings)
79
+ remoteChangelogPath = remoteChangelogPath (settings , destination)
80
+
81
+ files_to_upload = [[changelogPath , remoteChangelogPath]]
82
+
83
+ uploadFiles(settings , destination , files_to_upload)
84
+
85
+ end
86
+
87
+ end
88
88
 
89
89
  # files_to_upload is an array of arrays
90
90
  # that must be like [local_file_path , remote_file_path]
@@ -1,3 +1,3 @@
1
1
  module Mercure
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.homepage = 'https://github.com/teriiehina/mercure'
11
11
  spec.license = 'MIT'
12
12
 
13
- spec.date = '2014-03-06'
13
+ spec.date = '2015-11-23'
14
14
  spec.summary = "Build and distribute iOS app"
15
15
  spec.description = "A tool that works only with plist files"
16
16
  spec.authors = ["Peter Meuel"]
@@ -22,17 +22,17 @@ Gem::Specification.new do |spec|
22
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_development_dependency 'rspec'
26
- spec.add_development_dependency 'rspec-mocks'
27
- spec.add_development_dependency 'simplecov'
25
+ spec.add_development_dependency 'rspec', '~> 3.3'
26
+ spec.add_development_dependency 'rspec-mocks', '~> 3.3'
27
+ spec.add_development_dependency 'simplecov', '~> 0'
28
28
 
29
- spec.add_runtime_dependency 'bundler'
30
- spec.add_runtime_dependency "rake"
31
- spec.add_runtime_dependency 'thor'
32
- spec.add_runtime_dependency 'plist'
33
- spec.add_runtime_dependency 'net-scp'
34
- spec.add_runtime_dependency 'parse-ruby-client'
35
- spec.add_runtime_dependency 'nokogiri'
36
- spec.add_runtime_dependency 'CFPropertyList'
37
- spec.add_runtime_dependency 'xcpretty'
29
+ spec.add_runtime_dependency 'bundler', '~> 1.10'
30
+ spec.add_runtime_dependency "rake", '~> 0'
31
+ spec.add_runtime_dependency 'thor', '~> 0'
32
+ spec.add_runtime_dependency 'plist', '~> 3.1'
33
+ spec.add_runtime_dependency 'net-scp', '~> 1.2'
34
+ spec.add_runtime_dependency 'parse-ruby-client', '~> 0'
35
+ spec.add_runtime_dependency 'nokogiri', '~> 1.6'
36
+ spec.add_runtime_dependency 'CFPropertyList', '~> 2.3'
37
+ spec.add_runtime_dependency 'xcpretty', '~> 0.1'
38
38
  end
metadata CHANGED
@@ -1,183 +1,183 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Meuel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-06 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '3.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '3.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-mocks
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '3.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '3.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: simplecov
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '1.10'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '1.10'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: thor
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: plist
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '3.1'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '3.1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: net-scp
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '1.2'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '1.2'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: parse-ruby-client
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: nokogiri
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '1.6'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: '1.6'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: CFPropertyList
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: '2.3'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: '2.3'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: xcpretty
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: '0.1'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0'
180
+ version: '0.1'
181
181
  description: A tool that works only with plist files
182
182
  email: peter@teriiehina.net
183
183
  executables:
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  requirements: []
230
230
  rubyforge_project:
231
- rubygems_version: 2.4.4
231
+ rubygems_version: 2.2.2
232
232
  signing_key:
233
233
  specification_version: 4
234
234
  summary: Build and distribute iOS app