Skip to content

Commit

Permalink
Checking for configuration env variable
Browse files Browse the repository at this point in the history
* If no config is set the get the env variable
  • Loading branch information
Alex Fish committed May 1, 2014
1 parent 58c2e23 commit 97f5419
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/yolo/tasks/ios/release.rb
Expand Up @@ -32,6 +32,16 @@ def initialize
super
end

def configuration
config = @configuration

if !config
config = ENV['YOLO_RELEASE_CONFIG']
end

return config
end

#
# Uses Xcode to find the full path to generated app file
#
Expand Down
13 changes: 13 additions & 0 deletions spec/tasks/ios/release_spec.rb
Expand Up @@ -185,5 +185,18 @@
})
@release.deploy("")
end

it "should use the config env var if no config is set" do
config = "TEST_CONFIG"
ENV['YOLO_RELEASE_CONFIG'] = config
@release.configuration.should eq(config)
end

it "should use the config if it is set" do
config = "TEST_CONFIG"
@release.configuration = config
@release.configuration.should eq(config)
end

end
end

0 comments on commit 97f5419

Please sign in to comment.