Sha256: c1a2974b5c3d9d9b5d3861d723a0ad9a1c53a96454091a149accf4ec855f8bf6

Contents?: true

Size: 639 Bytes

Versions: 17

Compression:

Stored size: 639 Bytes

Contents

#!/usr/bin/env ruby

environment_tag = ARGV[0]&.strip

if environment_tag.nil? || environment_tag.empty?
  puts "Usage: story-ids-deployed ENVIRONMENT"
  exit 1
end

commit_range = `git tag -l #{environment_tag}* | tail -n 2 | tr '\n' ' ' | sed -e 's/ /../'`

if commit_range.nil? || commit_range.empty?
  puts "Empty commit range! Are there any commits tagged with #{environment_tag}?"
  exit 1
end

commit_message_bodies = `git log --pretty=%b #{commit_range}`.strip
story_ids = commit_message_bodies.
  scan(/\[Finishes\s*#(\d+)|,\s*#(\d+)\]|Fixes\s*#(\d+)|,\s*#(\d+)|#(\d+)\]/).
  flatten.
  compact.
  uniq

puts story_ids.join("\n")

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pivotoolz-2.4.2 exe/story-ids-deployed
pivotoolz-2.4.1 exe/story-ids-deployed
pivotoolz-2.4.0 exe/story-ids-deployed
pivotoolz-2.3.0 exe/story-ids-deployed
pivotoolz-2.2.0 exe/story-ids-deployed
pivotoolz-2.1.0 exe/story-ids-deployed
pivotoolz-2.0.0 exe/story-ids-deployed
pivotoolz-1.3.0 exe/story-ids-deployed
pivotoolz-1.2.2 exe/story-ids-deployed
pivotoolz-1.2.0 exe/story-ids-deployed
pivotoolz-1.1.1 exe/story-ids-deployed
pivotoolz-1.1.0 exe/story-ids-deployed
pivotoolz-1.0.0 exe/story-ids-deployed
pivotoolz-0.2.0 exe/story-ids-deployed
pivotoolz-0.1.3 exe/story-ids-deployed
pivotoolz-0.1.2 exe/story-ids-deployed
pivotoolz-0.1.1 exe/story-ids-deployed