Skip to content
This repository was archived by the owner on Feb 28, 2019. It is now read-only.

Commit f1d94e7

Browse files
committed
Extract out util ruby setup
1 parent a9a2a15 commit f1d94e7

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

tasks/release.rake

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
WORKSPACE_DIR = File.expand_path(File.dirname(__FILE__) + '/..')
1+
require File.expand_path(File.dirname(__FILE__) + '/util')
22

33
ENV['PREVIOUS_PRODUCT_VERSION'] = nil if ENV['PREVIOUS_PRODUCT_VERSION'].to_s == ''
44
ENV['PRODUCT_VERSION'] = nil if ENV['PRODUCT_VERSION'].to_s == ''
55

6-
def in_dir(dir)
7-
current = Dir.pwd
8-
begin
9-
Dir.chdir(dir)
10-
yield
11-
ensure
12-
Dir.chdir(current)
13-
end
14-
end
15-
166
def stage(stage_name, description, options = {})
177
if ENV['STAGE'].nil? || ENV['STAGE'] == stage_name || options[:always_run]
188
puts "🚀 Release Stage: #{stage_name} - #{description}"

tasks/util.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
WORKSPACE_DIR = File.expand_path(File.dirname(__FILE__) + '/..')
2+
3+
def in_dir(dir)
4+
current = Dir.pwd
5+
begin
6+
Dir.chdir(dir)
7+
yield
8+
ensure
9+
Dir.chdir(current)
10+
end
11+
end

0 commit comments

Comments
 (0)