Skip to content
This repository was archived by the owner on Sep 17, 2018. It is now read-only.

Commit 79cdb2c

Browse files
author
James Couball
committed
Make travis push features to relish immediately prior to publishing the gem to rubygems
1 parent 9b5ba2c commit 79cdb2c

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ addons:
99
code_climate:
1010
repo_token: d814b23d478d0908ef37c1c0aa685fdb0c6d5f0b38d8db0c68e58fd86a1f0fea
1111

12+
before_deploy:
13+
# publish features to https://www.relishapp.com/mysql-expectations/mysql-expectations/docs
14+
- rake relish
15+
1216
deploy:
1317
provider: rubygems
1418
api_key:

Rakefile

+10-7
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,20 @@ task :console do
5252
end
5353

5454
RELISH_PROJECT = 'mysql-expectations/mysql-expectations'
55-
RELISH_STAGING_PROJECT = 'mysql-expectations-staging/mysql-expectations'
55+
RELISH_STAGING_PROJECT = 'mysql-expectations/mysql-expectations-staging'
56+
57+
require 'mysql_expectations/version'
5658

5759
desc 'Push cucumber features to http://relishapp.com'
58-
task :relish, :version do |_t, args|
59-
fail 'rake relish[VERSION]' unless args[:version]
60-
if `relish versions #{RELISH_PROJECT}`.split.map(&:strip).include? args[:version]
61-
puts "Version #{args[:version]} already exists"
60+
task :relish do
61+
version = MySQLExpectations::Version::VERSION
62+
fail 'rake relish[VERSION]' unless version
63+
if `relish versions #{RELISH_PROJECT}`.split.map(&:strip).include? version
64+
puts "Version #{version} already exists"
6265
else
63-
sh "relish versions:add #{RELISH_PROJECT}:#{args[:version]}"
66+
sh "relish versions:add #{RELISH_PROJECT}:#{version}"
6467
end
65-
sh "relish push #{RELISH_PROJECT}:#{args[:version]}"
68+
sh "relish push #{RELISH_PROJECT}:#{version}"
6669
end
6770

6871
desc 'Push to relish staging environment of http://relishapp.com'

lib/mysql_expectations/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
module MySQLExpectations
66
# This module holds the gem version number used in the gemspec
77
module Version
8-
VERSION = '1.0.0'
8+
VERSION = '1.0.1'
99
end
1010
end

0 commit comments

Comments
 (0)