revision 1.5.2 → 1.6.1

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
  SHA256:
3
- metadata.gz: 4668b7330bbac8c0ff2be80e329372715b4e9a1c855324208dad6d0975c3fc53
4
- data.tar.gz: 27b0b200fd4e66fc6af0a579d4443d345f08e4205f1e89aafecebf7597d85365
3
+ metadata.gz: 2eb61c791c5f9c8e8261578dcaa580aca1a7f8a02c683c0e649f1ed34403ac39
4
+ data.tar.gz: 70262dc4433fd6c894a74b100c81142836dd059a9f5264688eff7a0286137a3e
5
5
  SHA512:
6
- metadata.gz: 533d69c1f6746f5aeedbbe72420937ed6976eb6dad4dd2ca8a75a7b13df8fa749b65284b137764997f62157a395f42d3ab11f23295b6b5035e14a57b4f524988
7
- data.tar.gz: cc6badb780cfff6bae1df61c5697df6c2c37db2221178fe9446c132aabbbe5d0b5a3ced994ca416b292dadef7276b99ef238b46ac502ea7b505955fcd951b05a
6
+ metadata.gz: d3fa4cd59ec2193032cd8a414445c3ba642496bbd36952595dae0c16c52ebd0b36804eec7f5dbc55804f3020d43ac9b69894a7ac38ebfa04dd71b21f1588a991
7
+ data.tar.gz: aa4f7e424425b1b22f80fac69f2b6d885cb63eb02ce4f080047528b5796a7482b0fef19ecae72192dce7b780593b87ff7c35ca0b7eed64a340761cf44d9b7dc2
data/.gitignore CHANGED
@@ -13,3 +13,5 @@ Gemfile.lock
13
13
 
14
14
  README.html
15
15
  *.zip
16
+ test-output
17
+ *.md5
data/README.org CHANGED
@@ -23,7 +23,7 @@
23
23
  # or alternatively #+SETUPFILE: theme-readtheorg.setup
24
24
 
25
25
  * Overview
26
- This gem automates revision management for source projects. The tool is language agnostic (used for C, ruby and matlab projects, to date -- though you're probably better off using bundler for ruby projects). It supports per-project configuration using a yaml-format file called =releasables.yaml= located at the project root.
26
+ This gem automates revision management for source projects. The tool is language agnostic (used for C, ruby, python and matlab projects, to date -- though you're probably better off using bundler for ruby projects). It supports per-project configuration using a yaml-format file called =releasables.yaml= located at the project root.
27
27
 
28
28
  It currently supports the following functionality
29
29
  - Manage 3-component revision IDs embedded natively in source file
@@ -31,9 +31,10 @@ It currently supports the following functionality
31
31
  - Automatically prompts for a changelog entry each time a revision identifier is incremented
32
32
  - Optionally commits and tags changes to a git repo after an update to the revision ID
33
33
  - Builds and archives projects in zip format (including release notes and arbitrary release artefacts defined
34
- - Deploys
34
+ - Deploys build artefacts to one or more defined (local or remote) filesystem locations
35
+ - Automatically generates md5sums when archiving or deploying build artefacts
35
36
 
36
- Worked on sporadically to allow me to tag, archive and deploy projects in multiple languages in a consistent fashion.
37
+ Hacked on sporadically to allow me to tag, archive and deploy projects in multiple languages in a consistent fashion.
37
38
 
38
39
  * Installation
39
40
  ** Dependencies
@@ -101,7 +102,7 @@ Run the executable with no arguments to get usage instructions in your console w
101
102
 
102
103
  #+RESULTS:
103
104
  #+begin_example
104
- Loading releasable definitions from /home/cormacc/dev/gem/revision/releasables.yaml ...
105
+ Loading releasable definitions from /home/cormacc/nmd/gem/revision/releasables.yaml ...
105
106
  Commands:
106
107
  revision --version, -v # print the version
107
108
  revision archive # Archive releasable(s)
@@ -111,6 +112,7 @@ Commands:
111
112
  revision help [COMMAND] # Describe available commands or one specific command
112
113
  revision info # Display info for all defined releasables
113
114
  revision major # Increment major revision index
115
+ revision md5 # Compute md5sums for current build artefacts
114
116
  revision minor # Increment minor revision index
115
117
  revision package # Build and archive releasables
116
118
  revision patch # Increment patch revision index
@@ -166,36 +168,39 @@ The lines beginning with '#' are explanatory comments
166
168
  #+END_NOTE
167
169
 
168
170
  #+BEGIN_SRC yaml
169
- - :id: my_releasable
170
- :revision:
171
- # Source file containing the revision identifier
172
- # This will also include changelog entries, embedded as comments
173
- :src: lib/revision/version.rb
174
- # Regex matching the source revision identifier. Must contain the following named capture groups
175
- # - major, minor, patch :: Numeric (uint) sequences representing the three revision ID components
176
- # - sep1, sep2 :: the characters separating the revision components
177
- # - prefix, postfix :: sufficient syntactic context to match the revision ID uniquely
178
- # N.B. this regex matches the version ID from the standard bundler gem skeleton,
179
- # e.g. VERSION = "1.1.0"
180
- :regex: (?<prefix>VERSION = ")(?<major>\d+)(?<sep1>\.)(?<minor>\d+)(?<sep2>\.)(?<patch>\d+)(?<postfix>")
181
- # Comment char for the project language -- prefixed to each line of changelog entries
182
- # Quotes only necessary here to prevent # being interpreted as the beginning of a YAML comment
183
- :comment_prefix: "#"
184
- # Sequence of build steps -- each item should be a valid shell command, prefixed with the YAML sequence item token, '- '
185
- :build_steps:
186
- - bundle exec rake install
187
- # Sequence defining the files (build artefacts) to package in the release archive.
188
- # Each artefact definition must include a :src: key/value pair.
189
- # An optional :dest: value may be provided to rename the file during packaging, or just (as in the first entry below)
190
- # to flatten the folder structure.
191
- # Any <VER> (or <REV>) in the :src: or :dest: placeholders wil be replaced with the current revision ID
192
- # The revision archive will also include the revision history extracted as a text file
193
- :artefacts:
194
- # A binary artefact -- the
195
- - :src: pkg/revision-<VER>.gem
196
- :dest: revision-<VER>.gem
197
- # This document -- the :dest: value defaults to duplicating :src: if not specified
198
- - :src: README.org
171
+ :releasables
172
+ - :id: my_releasable
173
+ :revision:
174
+ # Source file containing the revision identifier
175
+ # This will also include changelog entries, embedded as comments
176
+ :src: lib/revision/version.rb
177
+ # Regex matching the source revision identifier. Must contain the following named capture groups
178
+ # - major, minor, patch :: Numeric (uint) sequences representing the three revision ID components
179
+ # - sep1, sep2 :: the characters separating the revision components
180
+ # - prefix, postfix :: sufficient syntactic context to match the revision ID uniquely
181
+ # N.B. this regex matches the version ID from the standard bundler gem skeleton,
182
+ # e.g. VERSION = "1.1.0"
183
+ :regex: (?<prefix>VERSION = ")(?<major>\d+)(?<sep1>\.)(?<minor>\d+)(?<sep2>\.)(?<patch>\d+)(?<postfix>")
184
+ # Comment char for the project language -- prefixed to each line of changelog entries
185
+ # Quotes only necessary here to prevent # being interpreted as the beginning of a YAML comment
186
+ :comment_prefix: "#"
187
+ # Sequence of build steps -- each item should be a valid shell command, prefixed with the YAML sequence item token, '- '
188
+ :build_steps:
189
+ - bundle exec rake install
190
+ # Sequence defining the files (build artefacts) to package in the release archive.
191
+ # Each artefact definition must include a :src: key/value pair.
192
+ # An optional :dest: value may be provided to rename the file during packaging, or just (as in the first entry below)
193
+ # to flatten the folder structure.
194
+ # Any <VER> (or <REV>) in the :src: or :dest: placeholders wil be replaced with the current revision ID
195
+ # The revision archive will also include the revision history extracted as a text file
196
+ :artefacts:
197
+ # A binary artefact
198
+ - :src: pkg/revision-<VER>.gem
199
+ :dest: revision-<VER>.gem
200
+ # ':dest:' defaults to the string specified for ':src:' if not specified explicitly
201
+ # md5sums are generated by default for each artefact -- the ':md5:' option allows this to be disabled per-artefact
202
+ - :src: README.org
203
+ :md5: false
199
204
  #+END_SRC
200
205
 
201
206
  **** TODO (or at least consider) add support for overridable defaults
@@ -213,32 +218,32 @@ managing some embedded C projects, and the default values reflect this.
213
218
  #+END_NOTE
214
219
 
215
220
  #+BEGIN_SRC yaml
216
- :releasables:
217
- - :id: mbt_cd_firmware
218
- :revision:
219
- :src: src/FirmwareRevision.c
220
- :build_steps:
221
- - make --jobs=8 -f Makefile CONF=bootloadable
222
- :artefacts:
223
- - :src: dist/bootloadable/production/firmware.production.hex
224
- :dest: mbt_cd_firmware_v<REV>.bootloadable.hex
225
- - :src: dist/default/production/firmware.production.hex
226
- :dest: mbt_cd_firmware_v<REV>.standalone.hex
221
+ :releasables:
222
+ - :id: mbt_cd_firmware
223
+ :revision:
224
+ :src: src/FirmwareRevision.c
225
+ :build_steps:
226
+ - make --jobs=8 -f Makefile CONF=bootloadable
227
+ :artefacts:
228
+ - :src: dist/bootloadable/production/firmware.production.hex
229
+ :dest: mbt_cd_firmware_v<REV>.bootloadable.hex
230
+ - :src: dist/default/production/firmware.production.hex
231
+ :dest: mbt_cd_firmware_v<REV>.standalone.hex
227
232
  #+END_SRC
228
233
 
229
234
  **** Ruby project
230
235
 
231
236
  #+BEGIN_SRC yaml
232
- :releasables:
233
- - :id: revision
234
- :revision:
235
- :src: lib/revision/version.rb
236
- :regex: (?<prefix>VERSION = ")(?<major>\d+)(?<sep1>\.)(?<minor>\d+)(?<sep2>\.)(?<patch>\d+)(?<postfix>")
237
- :comment_prefix: "#"
238
- :build_steps:
239
- - bundle exec rake install
240
- :artefacts:
241
- - :src: pkg/revision-<VER>.gem
237
+ :releasables:
238
+ - :id: revision
239
+ :revision:
240
+ :src: lib/revision/version.rb
241
+ :regex: (?<prefix>VERSION = ")(?<major>\d+)(?<sep1>\.)(?<minor>\d+)(?<sep2>\.)(?<patch>\d+)(?<postfix>")
242
+ :comment_prefix: "#"
243
+ :build_steps:
244
+ - bundle exec rake install
245
+ :artefacts:
246
+ - :src: pkg/revision-<VER>.gem
242
247
  #+END_SRC
243
248
 
244
249
  *** Heirarchical project
@@ -250,7 +255,7 @@ at that root could include them as follows...
250
255
  #+BEGIN_SRC yaml
251
256
  :releasables:
252
257
  - :folder: examples/c
253
- - :folder: examples/ruby
258
+ - :folder: examples/ruby
254
259
  #+END_SRC
255
260
 
256
261
  **** TODO consider supporting a higher-level aggregate revision ID
@@ -260,16 +265,32 @@ at that root could include them as follows...
260
265
  :src: release_log.txt
261
266
  :releasables:
262
267
  - :folder: examples/c
263
- - :folder: examples/ruby
268
+ - :folder: examples/ruby
264
269
  #+END_SRC
265
270
 
266
271
  * Development
267
272
 
273
+ ** Environment
268
274
  After checking out the repo, run =bin/setup= to install dependencies. Then, run =rake spec= to run the tests. You can also run =bin/console= for an interactive prompt that will allow you to experiment.
269
275
 
270
- To install this gem onto your local machine, run =bundle exec rake install=.
276
+ ** Installation from source
277
+ To install this gem from source on your local machine, run =bundle exec rake install= from the repository root.
278
+
279
+ ** Incrementing release versions
280
+ You can do this using the gem, by entering one of the following commands at the repository root
281
+
282
+ | Command | Effect |
283
+ |------------------+----------------------------------------------|
284
+ | =revision patch= | Patch version increment, e.g. 1.1.0 -> 1.1.1 |
285
+ | =revision minor= | Patch version increment, e.g. 1.1.1 -> 1.2.0 |
286
+ | =revision major= | Major version increment, e.g. 1.2.0 -> 2.0.0 |
287
+
288
+ You'll be prompted to rebuild the gem, commit changes to the git repo and add a revision tag to the commit.
289
+
290
+ Alternatively, manually update the version number in =version.rb= and rebuild/install locally using =bundle exec rake install=
271
291
 
272
- To release a new version, update the version number in =version.rb=. You can do this using the gem, by entering =revision minor= (or =patch= or =major= as appropriate), and then run =bundle exec rake release=, which will create a git tag for the version, push git commits and tags, and push the =.gem= file to [rubygems.org](https://rubygems.org).
292
+ ** Deploying to rubygems
293
+ =bundle exec rake release=, will create a git tag for the version (if not, push git commits and tags, and push the =.gem= file to [rubygems.org](https://rubygems.org).
273
294
 
274
295
  * Contributing
275
296
 
data/lib/revision/cli.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'releasable'
4
4
  require_relative 'info'
5
5
  require_relative 'errors'
6
6
  require_relative 'version'
7
+ require_relative 'md5'
7
8
 
8
9
  module Revision
9
10
  class CLI < Thor
@@ -105,6 +106,21 @@ module Revision
105
106
  select_one.tag
106
107
  end
107
108
 
109
+ desc 'md5', 'Compute md5sums for current build artefacts'
110
+ method_option :file, :aliases => "-f", :type => :string, :default => nil ,:desc => "File to md5sum (defaults to build artefacts defined in yaml)"
111
+ def md5
112
+ r = select_one
113
+ files = options[:file].nil? ?
114
+ r.artefacts.select { |a| a[:md5]==true }.map { |a| a[:src] } :
115
+ [options[:file]]
116
+ raise "No files specified" unless files.length
117
+ puts "Calculating md5sum for files #{files}"
118
+ for f in files
119
+ md5sum = Revision::MD5.from_file(f)
120
+ puts "#{md5sum}"
121
+ end
122
+ end
123
+
108
124
  private
109
125
 
110
126
  def id_options
@@ -0,0 +1,51 @@
1
+ require 'digest'
2
+
3
+ class Revision::MD5
4
+
5
+ READ_CHUNK_KB = 1024
6
+ FILENAME_EXTENSION = "md5"
7
+
8
+ attr_reader :root, :filename
9
+
10
+ def self.from_file(filepath, filename: nil)
11
+ raise "File #{filepath} not found" unless File.exist?(filepath)
12
+ filename ||= File.basename(filepath)
13
+ root = File.dirname(filepath)
14
+ stream = File.open(filepath, 'rb')
15
+ new(stream, filename, root: root)
16
+ end
17
+
18
+ def initialize(ioreader, filename, root: nil)
19
+ root ||= Dir.getwd
20
+ @reader = ioreader
21
+ @root = root
22
+ @filename = filename
23
+ end
24
+
25
+ def calc
26
+ md5 = Digest::MD5.new
27
+ bytes_per_chunk = READ_CHUNK_KB*1024
28
+ while chunk = @reader.read(bytes_per_chunk)
29
+ md5 << chunk
30
+ end
31
+ md5.hexdigest
32
+ end
33
+
34
+ def to_s
35
+ <<~EOT
36
+ #{calc} #{@filename}
37
+ EOT
38
+ end
39
+
40
+ def md5filename
41
+ "#{@filename}.#{FILENAME_EXTENSION}"
42
+ end
43
+
44
+ def write(filepath: nil)
45
+ filepath ||= File.join(@root, md5filename)
46
+ filename = File.basename(filepath)
47
+ File.open(filepath, "w") { |f| f.write "#{calc} #{filename}" }
48
+ filepath
49
+ end
50
+
51
+ end
@@ -68,7 +68,8 @@ module Revision
68
68
  # Legacy definition syntax compatibility
69
69
  @build_def = config[:build] ? config[:build] : { environment: { variables: {}}, steps: config[:build_steps]}
70
70
  @artefacts = config[:artefacts] || []
71
- @artefacts.each { |a| a[:dest] ||= a[:src] } unless @artefacts.nil? || @artefacts.empty?
71
+ @artefacts.each { |a| a[:dest] ||= File.basename(a[:src]) } unless @artefacts.nil? || @artefacts.empty?
72
+ # @artefacts.each { |a| a[:md5] = true if a[:md5].nil? } unless @artefacts.nil? || @artefacts.empty?
72
73
  @config = config
73
74
  end
74
75
 
@@ -166,7 +167,6 @@ module Revision
166
167
  puts commit_message
167
168
  system("git commit -a -m \"#{commit_message}\"")
168
169
  puts "Tagging as #{tag_id}"
169
- puts "git tag -a #{tag_id} -m \"#{tag_annotation}\""
170
170
  system("git tag -a #{tag_id} -m \"#{tag_annotation}\"")
171
171
  end
172
172
  end
@@ -188,46 +188,61 @@ module Revision
188
188
  "#{@id}_revision_history_v#{@revision}.txt"
189
189
  end
190
190
 
191
- def artefact_map(dest_prefix = '')
192
- amap = {}
193
- @artefacts.each_with_index do |a, index|
194
- src = a[:src].gsub(REVISION_PLACEHOLDER, @revision.to_s)
195
- dest = a[:dest].gsub(REVISION_PLACEHOLDER, @revision.to_s)
196
- if Gem.win_platform? && !src.end_with?('.exe') && File.exist?(File.join(@root, src + '.exe'))
197
- puts "... windows platform -- appending '.exe' (#{src})"
198
- src += '.exe'
199
- dest += '.exe' unless dest.end_with?('.exe')
200
- end
201
- src = File.join(@root,src)
202
- dest = dest_prefix.empty? ? dest : File.join(dest_prefix, dest)
203
- amap[src] = dest
191
+ def interp_rev(string)
192
+ string.gsub(REVISION_PLACEHOLDER, @revision.to_s)
193
+ end
194
+
195
+ def normalise_artefact(a)
196
+ src_norm = interp_rev(a[:src])
197
+ a_norm = {
198
+ src: src_norm,
199
+ dest: a[:dest].nil? ? File.basename(src_norm) : interp_rev(a[:dest]),
200
+ md5: a[:md5].nil? ? true : a[:md5]
201
+ }
202
+ if Gem.win_platform? && !a_norm[:src].end_with?('.exe') && File.exist?(File.join(@root, a_norm[:src] + '.exe'))
203
+ puts "... windows platform -- appending '.exe' ('#{a_norm[:src]}' -> '#{a_norm[:src]}.exe')"
204
+ a_norm[:src] += '.exe'
205
+ a_norm[:dest] += '.exe' unless a_norm[:dest].end_with?('.exe')
204
206
  end
205
- amap
207
+ a_norm
208
+ end
209
+
210
+ def artefacts
211
+ @artefacts.map { |a| normalise_artefact(a)}
206
212
  end
207
213
 
208
214
  def archive
209
215
  puts "Archiving #{@artefacts.length} build artefacts as #{archive_name}..."
210
- amap = artefact_map
211
216
  if File.exist?(archive_name)
212
217
  puts "... deleting existing archive"
213
218
  File.delete(archive_name)
214
219
  end
215
220
  Zip::File.open(archive_name, Zip::File::CREATE) do |zipfile|
216
- amap.each.with_index(1) do |entry, idx|
217
- src, dest = entry
218
- #TODO: Add directory processing....
219
- puts "... (#{idx}/#{amap.length}) #{src} => #{dest}"
220
- zipfile.add(dest, src)
221
+ zip_entries = artefacts
222
+ zip_entries.each.with_index(1) do |a, idx|
223
+ puts "... (#{idx}/#{zip_entries.length}) #{a[:dest]} :: <= #{a[:src]}"
224
+ zipfile.add(a[:dest], a[:src])
225
+ if a[:md5]
226
+ md5name = "#{a[:dest]}.md5"
227
+ puts "... (#{idx}/#{zip_entries.length}) #{a[:dest]} :: embedding md5sum (#{md5name})"
228
+ zipfile.get_output_stream(md5name) { |os| os.write("#{MD5.from_file(a[:src])}")}
229
+ else
230
+ puts "... (#{idx}/#{zip_entries.length}) #{a[:dest]} :: no md5sum required"
231
+ end
221
232
  end
222
233
  puts "... embedding revision history as #{changelog_name} "
223
234
  zipfile.get_output_stream(changelog_name) { |os| output_changelog(os)}
224
235
  end
236
+ archive_md5 = MD5.from_file(archive_name)
237
+ puts "... generating archive md5sum as #{archive_md5.md5filename} "
238
+ archive_md5.write
225
239
 
226
240
  if @config.dig(:archive)
227
241
  archive_root = File.expand_path(@config[:archive])
228
242
  puts "... moving #{archive_name} to #{archive_root}"
229
243
  FileUtils.mkdir_p(archive_root)
230
244
  FileUtils.mv(archive_name, archive_root)
245
+ FileUtils.mv(archive_md5.md5filename, archive_root)
231
246
  end
232
247
  end
233
248
 
@@ -245,10 +260,6 @@ module Revision
245
260
 
246
261
  raise Errors::NotSpecified.new(':deploy') if destinations.empty?
247
262
 
248
- if @config.dig(:deploy, :pre)
249
- exec_pipeline('deploy (pre)', @config[:deploy][:pre])
250
- end
251
-
252
263
  destinations.each do |d|
253
264
  destination = File.expand_path(d[:dest])
254
265
 
@@ -256,21 +267,23 @@ module Revision
256
267
  exec_pipeline('deploy (pre / #{d[:dest]})', d[:pre])
257
268
  end
258
269
 
259
- puts "Deploying #{@artefacts.length} build artefacts to #{destination}..."
270
+ puts "Deploying #{artefacts.length} build artefacts to #{destination}..."
260
271
  if not File.exist?(destination)
261
272
  puts "... folder not found -> creating ... '#{destination}'"
262
273
  FileUtils.mkdir_p(destination)
263
274
  end
264
- amap = artefact_map(destination)
265
- amap.each.with_index(1) do |entry, idx|
266
- src, dest = entry
267
- puts "... (#{idx}/#{amap.length}) #{src} => #{dest}"
275
+ artefacts.each.with_index(1) do |a, idx|
276
+ # src, dest = entry
277
+ src = File.join(@root,a[:src])
278
+ dest = destination.empty? ? a[:dest] : File.join(destination, a[:dest])
279
+ puts "... (#{idx}/#{artefacts.length}) #{src} => #{dest}"
268
280
  if File.exist?(dest)
269
281
  puts "... deleting existing '#{dest}' ..."
270
282
  FileUtils.rm_rf(dest)
271
283
  end
272
- puts "... deploying '#{src}' -> '#{dest}"
284
+ puts "... deploying '#{src}' -> '#{dest}'"
273
285
  FileUtils.cp_r(src,dest)
286
+ puts "... writing md5sum for '#{dest}' to '#{MD5.from_file(dest).write}'" if a[:md5]
274
287
  end
275
288
  File.open(File.join(destination,changelog_name),'w') { |f| output_changelog(f)}
276
289
 
@@ -279,11 +292,6 @@ module Revision
279
292
  end
280
293
  end
281
294
 
282
-
283
-
284
- if @config.dig(:deploy, :post)
285
- exec_pipeline('deploy (post)', @config[:deploy][:post])
286
- end
287
295
  end
288
296
 
289
297
  def package
@@ -1,10 +1,19 @@
1
1
  # Defines the revision ID for the revision gem
2
2
  module Revision
3
- VERSION = "1.5.2".freeze
3
+ VERSION = "1.6.1".freeze
4
4
  end
5
5
 
6
6
  # <BEGIN CHANGELOG>
7
7
  #
8
+ # Version 1.6.1 (31 Aug 2022)
9
+ # - Fixed logging error preventing windows exe creation
10
+ #
11
+ # Version 1.6.0 (01 Dec 2021)
12
+ # - New feature: Automated MD5sum generation during 'archive' and 'deploy' tasks
13
+ #
14
+ # Version 1.5.3 (26 Oct 2021)
15
+ # - Multiple deployment destinations bugfix -- only last destination was being used.
16
+ #
8
17
  # Version 1.5.2 (10 Jun 2020)
9
18
  # - Uprevving around undeletable git tag
10
19
  #
data/releasables.yaml CHANGED
@@ -5,6 +5,17 @@
5
5
  :regex: (?<prefix>VERSION = ")(?<major>\d+)(?<sep1>\.)(?<minor>\d+)(?<sep2>\.)(?<patch>\d+)(?<postfix>".freeze)
6
6
  :comment_prefix: "#"
7
7
  :build_steps:
8
+ - mkdir -p test-output/2
8
9
  - bundle exec rake install
10
+ #Define 3 build artefacts as test cases for 'deploy' and 'archive' tasks
11
+ #Expect MD5 file to be generated by default for first entry (where not specified explicitly)
9
12
  :artefacts:
10
13
  - :src: pkg/revision-<VER>.gem
14
+ - :src: README.org
15
+ :md5: false
16
+ - :src: Rakefile
17
+ :md5: true
18
+ #Define two deployment destinations to verify multiple deployments work as intended
19
+ :deploy:
20
+ - :dest: ./test-output
21
+ - :dest: ./test-output/2
data/revision.gemspec CHANGED
@@ -28,4 +28,15 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency "rake", "~> 13.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
30
  spec.add_development_dependency "pry"
31
+ #emacs ruby layer deps...
32
+ #...lsp backend
33
+ spec.add_development_dependency "steep"
34
+ spec.add_development_dependency "solargraph"
35
+ #...robe backend
36
+ #....watch this space
37
+ #...generic
38
+ spec.add_development_dependency "ruby_parser"
39
+ spec.add_development_dependency "rubocop"
40
+ spec.add_development_dependency "prettier"
41
+ spec.add_development_dependency "seeing_is_believing"
31
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revision
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cormac Cannon
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-10 00:00:00.000000000 Z
11
+ date: 2022-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -94,10 +94,94 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: steep
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: solargraph
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: ruby_parser
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: prettier
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: seeing_is_believing
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
97
181
  description: Updates project revision identifiers in software source files and associated
98
182
  change log. Can also build and package project archives as a zip and optionally
99
183
  commit, tag and push to a Git repo.
100
- email:
184
+ email:
101
185
  executables:
102
186
  - revision
103
187
  extensions: []
@@ -117,6 +201,7 @@ files:
117
201
  - lib/revision/cli.rb
118
202
  - lib/revision/errors.rb
119
203
  - lib/revision/info.rb
204
+ - lib/revision/md5.rb
120
205
  - lib/revision/releasable.rb
121
206
  - lib/revision/string_case.rb
122
207
  - lib/revision/version.rb
@@ -127,7 +212,7 @@ licenses:
127
212
  - MIT
128
213
  metadata:
129
214
  source_code_uri: https://github.com/cormacc/revision
130
- post_install_message:
215
+ post_install_message:
131
216
  rdoc_options: []
132
217
  require_paths:
133
218
  - lib
@@ -142,8 +227,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
227
  - !ruby/object:Gem::Version
143
228
  version: '0'
144
229
  requirements: []
145
- rubygems_version: 3.1.3
146
- signing_key:
230
+ rubygems_version: 3.3.15
231
+ signing_key:
147
232
  specification_version: 4
148
233
  summary: Language-agnostic revision management tool
149
234
  test_files: []