WTBuildHelpers 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: e6418a62d2f8b5af8789b0e040b099192d655c44
4
- data.tar.gz: 518f10e071661fb471d5bf1350ef0d7f29dce4e9
3
+ metadata.gz: 51e1cc5730730ac7564c96bb32309baadcc7a5ca
4
+ data.tar.gz: ecb3ffe37474965c38a8de1fe724f76c076dae40
5
5
  SHA512:
6
- metadata.gz: b751fd611f57471cd40ddadbbd4f74fdca88f14539bc8bc3788adf9391f5c8356b11b2d922ee86dfbaa21aa5b5280eaf4427785c8674b63e043e3bba29fa1f3b
7
- data.tar.gz: acf144d2c25e5e1e666da093fcdc9affb720574444f3f4c86e95b8cc452ea0fc2feacc3ae910b69d572f162c2b54761d5d0c987cb5e54e98106e1e8902bb579c
6
+ metadata.gz: 23e0fef0dfb2d2e4ca208bea7ae178c8cf81e6d8d4d862e459a6be4d268ae062827d93e715809254a935597736a4f2e06f5ad7e6803bde7928b0b7a1a8dbdc75
7
+ data.tar.gz: 4d7efd94a058780c7dc39c18f0f68c991d7cc8d9d3bae704eea9876fa3527596ee45ce839cd741e0c3c5977dede69bbc88d9076e000f6653d5e6fba3b155e290
data/exe/wtbuild CHANGED
@@ -45,7 +45,7 @@ else
45
45
  end
46
46
 
47
47
  if command
48
- if ARGV.count == 0 || ARGV[0] == "--help"
48
+ if ARGV[0] == "--help"
49
49
  command.help_function.call()
50
50
  else
51
51
  command.run_function.call(ARGV)
@@ -1,3 +1,3 @@
1
1
  module WTBuildHelpers
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/jira.rb CHANGED
@@ -77,7 +77,7 @@ module WTBuildHelpers::JIRA
77
77
  args = Options.new()
78
78
 
79
79
  opt_parser = OptionParser.new do |opts|
80
- opts.banner = "Usage: jira_tasks.rb [options]"
80
+ opts.banner = "Usage: jira_update_from_build [options]"
81
81
 
82
82
  opts.on("-c", "--commits COMMIT_RANGE", "Specify a commit range") do |commit_range|
83
83
  args.commit_range = commit_range
@@ -192,7 +192,7 @@ module WTBuildHelpers::JIRA
192
192
  valid_options = true
193
193
  if options.commit_range == nil
194
194
  puts "Commit range is required. None specified."
195
- puts "You can specify this in TeamCity by running 'teamcity_git_range_fetch.rb' before this step." if ENV["TEAMCITY_VERSION"]
195
+ puts "You can specify this in TeamCity by running 'teamcity_fetch_git_range' before this step." if ENV["TEAMCITY_VERSION"]
196
196
  valid_options = false
197
197
  end
198
198
  if options.site == nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: WTBuildHelpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - WillowTreeApps
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-21 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: OptionParser
@@ -88,7 +88,6 @@ files:
88
88
  - lib/help.rb
89
89
  - lib/jira.rb
90
90
  - lib/teamcity.rb
91
- - lib/teamcity_git_range_fetch.rb
92
91
  homepage:
93
92
  licenses:
94
93
  - MIT
@@ -1,46 +0,0 @@
1
- #! /usr/bin/env ruby
2
-
3
- require 'base64'
4
- require 'json'
5
- require 'rest_client'
6
- require 'pp'
7
-
8
- module WTBuildHelpers
9
- module TeamCity
10
- def self.fetch_commit_range(teamcity_url, build_type_id, username, password)
11
-
12
- auth = "#{username}:#{password}"
13
- auth_token = Base64.strict_encode64(auth)
14
-
15
- headers = { "Authorization" => "Basic #{auth_token}",
16
- "Accept" => "application/json"
17
- }
18
- full_url = "#{teamcity_url}/app/rest/buildTypes/id:#{build_type_id}/builds/status:SUCCESS"
19
-
20
- begin
21
- response = RestClient.get(full_url, headers=headers)
22
- json_response = JSON.parse(response.body)
23
- rescue RestClient::Exception => e
24
- pp e
25
- exit
26
- end
27
-
28
- start_revision = ENV["BUILD_VCS_NUMBER"]
29
- end_revision = json_response["revisions"]["revision"][0]["version"]
30
-
31
- puts "##teamcity[setParameter name='env.TEAMCITY_COMMIT_RANGE' value='#{end_revision}..#{start_revision}']"
32
- end
33
- end
34
- end
35
-
36
- if __FILE__ == $0
37
- if ARGV.length < 4
38
- puts "Usage: teamcity_git_range_fetch.rb [TeamCity Url] [TeamCity Build Type Id] [TeamCity User Name] [TeamCity Password]"
39
- puts "These parameters can be passed from TeamCity with the following line: "
40
- puts " teamcity_git_range_fetch.rb \"%teamcity.serverUrl%\" \"%system.teamcity.buildType.id%\" \"%system.teamcity.auth.userId%\" \"%system.teamcity.auth.password%\""
41
-
42
- exit
43
- end
44
-
45
- WTBuildHelpers::TeamCity.fetch_commit_range(ARGV[0], ARGV[1], ARGV[2], ARGV[3])
46
- end