Class: Albacore::SqlPackage::Config

Inherits:
Object
  • Object
show all
Extended by:
ConfigDSL
Includes:
CmdConfig, Logging
Defined in:
lib/albacore/task_types/sql_package.rb

Overview

The configuration class for SqlPackage. MSDN docs at: msdn.microsoft.com/en-us/library/hh550080(vs.103).aspx

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConfigDSL

attr_path, attr_path_accessor

Methods included from Logging

#debug, #err, #error, #fatal, #info, #puts, #trace, #warn

Methods included from CmdConfig

#add_parameter, #parameters

Constructor Details

#initializeConfig

Returns a new instance of Config.



45
46
47
48
49
50
51
52
53
54
# File 'lib/albacore/task_types/sql_package.rb', line 45

def initialize
  @parameters = Set.new

  w = lambda { |e| CrossPlatformCmd.which(e) ? e : nil }

  @exe = w.call( "SqlPackage" ) 

  debug { "SqlPackage using '#{@exe}'" }

end

Instance Attribute Details

#actionObject (readonly)

this is the action of SqlPackage



34
35
36
# File 'lib/albacore/task_types/sql_package.rb', line 34

def action
  @action
end

#profileObject (readonly)

this is the profile of SqlPackage



40
41
42
# File 'lib/albacore/task_types/sql_package.rb', line 40

def profile
  @profile
end

#propertiesObject

any properties you want to set



43
44
45
# File 'lib/albacore/task_types/sql_package.rb', line 43

def properties
  @properties
end

#sql_packageObject (readonly)

this is the sql_package of SqlPackage



37
38
39
# File 'lib/albacore/task_types/sql_package.rb', line 37

def sql_package
  @sql_package
end

Instance Method Details

#be_quietObject

Specifies whether detailed feedback is suppressed. Defaults to False.



84
85
86
# File 'lib/albacore/task_types/sql_package.rb', line 84

def be_quiet
  @parameters.add "/Quiet:True"
end

#prop(k, v) ⇒ Object

Allows you to add properties to MsBuild; example:

b.prop ‘CommandTimeout’, 60 b.prop ‘DacMajorVersion’, 1

The properties will be automatically converted to the correct syntax



62
63
64
65
66
67
# File 'lib/albacore/task_types/sql_package.rb', line 62

def prop k, v
  @properties ||= Hash.new
  @parameters.delete "/p:#{make_props}" if @properties.any?
  @properties[k] = v
  @parameters.add "/p:#{make_props}"
end

#verify_deploymentObject

Specifies whether checks should be performed before publishing that will stop the publish action if issues are present that might block successful publishing. For example, your publish action might stop if you have foreign keys on the target database that do not exist in the database project, and that will cause errors when you publish.



79
80
81
# File 'lib/albacore/task_types/sql_package.rb', line 79

def verify_deployment
  @parameters.add "/p:VerifyDeployment=True"
end