lib/jenkins/builder/app.rb in jenkins-builder-0.1.6 vs lib/jenkins/builder/app.rb in jenkins-builder-0.2.0
- old
+ new
@@ -4,29 +4,31 @@
require 'jenkins_api_client'
require 'pastel'
require 'tty-spinner'
require 'time'
+$is_mac = `uname`.chomp == 'Darwin'
+
module Jenkins
module Builder
class App
attr_accessor :config, :secret, :client, :options
def initialize(options={})
@options = options
@config = Jenkins::Builder::Config.new
- @secret = Jenkins::Builder::Secret.new
+ @secret = ($is_mac ? Jenkins::Builder::Secret.new : @config)
if @config.url && @config.username && @secret.password
@client = JenkinsApi::Client.new(server_url: @config.url,
username: @config.username,
password: @secret.password)
end
end
def main(args)
- validate_os!
+ # validate_os!
validate_fzf!
Jenkins::Builder::CLI.create_alias_commands(@config.aliases || [])
Jenkins::Builder::CLI.start(args)
rescue => e
STDERR.puts(e.message)