albacore 2.0.0.rc.20 → 2.0.0.rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ab62cb5122970f416017ee8d59b6b8734a25185
4
- data.tar.gz: cef3457b0ca2e9078330eb175c43d7ae050871a9
3
+ metadata.gz: e10a52e5c2b0ac97eb26932080f3c411c45f0c05
4
+ data.tar.gz: cccdff1161c1a5f5d1edef5cee69d70fd5469b81
5
5
  SHA512:
6
- metadata.gz: a05a96f5d60891dadf48527f911873f88fdef424a57af114987b21c138b66801226c7d96bcd453fbb95e545f5b17c8bf27921ea5b427d6b56f8abeeaa20a8f68
7
- data.tar.gz: bcd210ec2e9343324eb148facaf0797b97a78691780283a45b7ab15bc01595279032a3a998dcb33287a49713786b23272b5c2837cdb19c5ee34520fb86da4ca3
6
+ metadata.gz: df6373dac8389c187d9f65e10fa81c382beb85aa51a30b8655fccee46f641effe165e03cf81369ea0c137536b7f3eebdbe9c8c0a408c0f4a0154a59cb6575a3a
7
+ data.tar.gz: 0a2d1f9a473052cba4a2a89b13d88b90f65a3646f2ecf742f365a1a6f9d532efcf332dd0c8c631ec57a1dd05c30e5211141fdfe468650dbd611e7c83a224df46
@@ -42,13 +42,6 @@ module Albacore
42
42
  conf['exe'] || "#{proj.asmname}.exe"
43
43
  end
44
44
 
45
- # Gets the location fully qualified path that the finished artefact will be
46
- # installed into. Defaults to C:\\Services\\{id}.
47
- #
48
- def deploy_dir
49
- conf['deploy_dir'] || "C:\\Services\\#{id}"
50
- end
51
-
52
45
  # Resolves the project file given an optional descriptor path or a
53
46
  # configuration hash or both. One of the other of the parameters need to
54
47
  # exist, or an error will be thrown.
@@ -164,6 +157,19 @@ module Albacore
164
157
  conf['provider'] || 'defaults'
165
158
  end
166
159
 
160
+ # Gets the configured port to bind the site to
161
+ #
162
+ def port
163
+ conf['port'] || '80'
164
+ end
165
+
166
+ # Gets the host header to use for the binding in IIS - defaults to *, i.e.
167
+ # binding to all hosts
168
+ #
169
+ def host_header
170
+ conf['host_header'] || '*'
171
+ end
172
+
167
173
  # TODO: support a few of these:
168
174
  # https://github.com/bernd/fpm-cookery/wiki/Recipe-Specification
169
175
 
@@ -38,6 +38,13 @@ module Albacore
38
38
  end
39
39
  end
40
40
 
41
+ # Gets the location fully qualified path that the finished artefact will be
42
+ # installed into. Defaults to C:\\Services\\{id}.
43
+ #
44
+ def deploy_dir app_spec
45
+ app_spec.conf['deploy_dir'] || "C:\\Services\\#{app_spec.id}"
46
+ end
47
+
41
48
  # Get the relative resource from 'albacore/app_spec/.' as a string.
42
49
  def embedded_resource relative_path
43
50
  File.open(embedded_resource_path(relative_path), 'r') { |io| io.read }
@@ -53,7 +60,7 @@ module Albacore
53
60
 
54
61
  io.write %{
55
62
  Install-Service `
56
- -ServiceExeName "#{app_spec.exe}" -ServiceDir "#{app_spec.deploy_dir}" `
63
+ -ServiceExeName "#{app_spec.exe}" -ServiceDir "#{deploy_dir app_spec}" `
57
64
  -CurrentPath (Split-Path $MyInvocation.MyCommand.Path)
58
65
  }
59
66
  end
@@ -15,17 +15,20 @@ module Albacore
15
15
 
16
16
  # location/folder inside nuget to place everything found in the
17
17
  # #source_dir inside
18
+ #
18
19
  def nuget_contents
19
20
  'contents'
20
21
  end
21
22
 
22
23
  # where to copy from - will copy ALL contents of this directory - in this
23
24
  # case will copy from the directory that the appspec is in.
25
+ #
24
26
  def source_dir app_spec, configuration = 'Release'
25
27
  "#{File.dirname(app_spec.path)}/."
26
28
  end
27
29
 
28
30
  # Extends the outputted data with the installation routines
31
+ #
29
32
  def write_invocation app_spec, io
30
33
  debug { 'writing iis site installation invocation [app_spec/iis_site#write_invocation]' }
31
34
 
@@ -35,8 +38,17 @@ module Albacore
35
38
 
36
39
  # deliberately lowercase id/name/title.
37
40
  Install-Site -SiteName '#{app_spec.title}' `
38
- -WebSiteRootFolder '#{normalise_slashes(File.expand_path('..', app_spec.deploy_dir))}'
41
+ -Port #{app_spec.port} `
42
+ -HostHeader '#{app_spec.host_header}' `
43
+ -WebSiteRootFolder '#{normalise_slashes(deploy_dir(app_spec))}'
39
44
  }
40
45
  end
46
+
47
+ # Overrides the default deploy dir with a folder that is NOT services,
48
+ # unless the property is set in the .appspec file.
49
+ #
50
+ def deploy_dir app_spec
51
+ app_spec.conf['deploy_dir'] || "C:\\WebSites"
52
+ end
41
53
  end
42
54
  end
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "2.0.0.rc.20"
2
+ VERSION = "2.0.0.rc.21"
3
3
  end
@@ -4,13 +4,16 @@ Function Install-Site(
4
4
  # Folder where all your websites are located
5
5
  [string] $WebSiteRootFolder = "C:\WebSites",
6
6
 
7
- # The port your default binding is using
8
- [int] $Port = 80,
9
-
10
7
  # Where the source files are -- without any trailing slash or otherwise --
11
8
  # just the name, please.
12
9
  [string] $SourceDirectory = "contents",
13
10
 
11
+ # What domain name the site should bind to
12
+ [string] $HostHeader,
13
+
14
+ # The port your default binding is using
15
+ [int] $Port,
16
+
14
17
  # Name of site that you're setting up
15
18
  [string] $SiteName
16
19
  ) {
@@ -41,10 +44,8 @@ Function Install-Site(
41
44
  # Create application pool
42
45
  New-WebAppPool -Name $siteAppPool -Force
43
46
 
44
- $hostHeader = Invoke-Expression "facter fqdn"
45
-
46
47
  # Create site
47
- New-Website -Name $SiteName -Port $Port -HostHeader $hostHeader `
48
+ New-Website -Name $SiteName -Port $Port -HostHeader $HostHeader `
48
49
  -ApplicationPool $siteAppPool -PhysicalPath $siteInstallLocation
49
50
  }
50
51
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: albacore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc.20
4
+ version: 2.0.0.rc.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Feldt