Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable: (24 commits)
  (GH-839) Switch to apply package parameters to dependent packages
  (maint) formatting methods / parameters in calls
  (GH-958) If SSLv3 in Posh v2 Fails, Use Original
  (GH-746) Use HTTPS if available when HTTP url
  (GH-957) Skip Get-WebFileName When FTP
  (GH-948) Ensure passwords / keys are not logged
  (GH-952) Get-ChocolateyWebFile enhancements
  (doc) update generated docs
  (maint) formatting
  (docs) move GenerateDocs.ps1 / update
  (GH-932) Do not set unknown checksum to 'md5'
  (GH-719) Reset ServerCertificateValidationCallback
  (GH-305) add MSP/MSU installer types
  (GH-305) update exitcodes to long
  (GH-954) Pending fails when lib does not exist
  (GH-950) Install-ChocolateyPackage - UseOriginalLocation
  (maint) formatting
  (GH-922) Automatically determine checksum type
  (maint) fixes for shimgen
  (GH-948) Do not log sensitive arguments
  ...
  • Loading branch information
ferventcoder committed Sep 12, 2016
2 parents bd7b2c5 + 315a882 commit e26c02c
Show file tree
Hide file tree
Showing 57 changed files with 592 additions and 110 deletions.
10 changes: 5 additions & 5 deletions .build.custom/GenerateDocs.ps1 → GenerateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ $ErrorActionPreference = 'Stop'

$thisDirectory = (Split-Path -parent $MyInvocation.MyCommand.Definition);
$psModuleName = 'chocolateyInstaller'
$psModuleLocation = [System.IO.Path]::GetFullPath("$thisDirectory\..\src\chocolatey.resources\helpers\chocolateyInstaller.psm1")
$docsFolder = [System.IO.Path]::GetFullPath("$thisDirectory\..\docs\generated")
$chocoExe = [System.IO.Path]::GetFullPath("$thisDirectory\..\code_drop\chocolatey\console\choco.exe")
$psModuleLocation = [System.IO.Path]::GetFullPath("$thisDirectory\src\chocolatey.resources\helpers\chocolateyInstaller.psm1")
$docsFolder = [System.IO.Path]::GetFullPath("$thisDirectory\docs\generated")
$chocoExe = [System.IO.Path]::GetFullPath("$thisDirectory\code_drop\chocolatey\console\choco.exe")
$lineFeed = "`r`n"
$global:powerShellReferenceTOC = @'
# PowerShell Functions aka Helpers Reference
Expand Down Expand Up @@ -107,7 +107,7 @@ function Replace-CommonItems($text) {

$text = $text.Replace("`n",$lineFeed)
$text = $text -replace '(community feed[s]?|community repository)', '[$1](https://chocolatey.org/packages)'
$text = $text -replace '(Chocolatey for Business|Chocolatey Pro[fessional]*)', '[$1](https://chocolatey.org/compare)'
$text = $text -replace '(Chocolatey for Business|Chocolatey Professional|Chocolatey Pro)(?=[^\w])', '[$1](https://chocolatey.org/compare)'
$text = $text -replace '(Pro[fessional]\s?/\s?Business)', '[$1](https://chocolatey.org/compare)'
$text = $text -replace '([Ll]icensed editions)', '[$1](https://chocolatey.org/compare)'
$text = $text -replace '([Ll]icensed versions)', '[$1](https://chocolatey.org/compare)'
Expand Down Expand Up @@ -198,7 +198,7 @@ param(
$commandText = $commandText -replace '^(.+):\s(.+.gif)$', '![$1]($2)'
$commandText = $commandText -replace '^(\s+)\<\?xml', "~~~xml$lineFeed`$1<?xml"
$commandText = $commandText -replace '^(\s+)</packages>', "`$1</packages>$lineFeed~~~"
$commandText = $commandText -replace '(Chocolatey for Business|Chocolatey Pro[fessional]*)', '[$1](https://chocolatey.org/compare)'
$commandText = $commandText -replace '(Chocolatey for Business|Chocolatey Professional|Chocolatey Pro)(?=[^\w])', '[$1](https://chocolatey.org/compare)'
$commandText = $commandText -replace '(Pro[fessional]\s?/\s?Business)', '[$1](https://chocolatey.org/compare)'
$commandText = $commandText -replace '([Ll]icensed editions)', '[$1](https://chocolatey.org/compare)'
$commandText = $commandText -replace '([Ll]icensed versions)', '[$1](https://chocolatey.org/compare)'
Expand Down
7 changes: 6 additions & 1 deletion docs/generated/CommandsDownload.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ Downloads a package from a source, optionally downloading remote
existing package and makes it available without any internet
requirement.

See https://chocolatey.org/docs/features-automatically-recompile-packages


## Usage

choco download <pkg [<options/switches>]

## Examples

choco download sysinternals
choco download notepadplusplus.install --recompile --embed
choco download notepadplusplus.install --recompile
choco download notepadplusplus.install --recompile --resources-location \\server\share
choco download notepadplusplus.install --recompile --resources-location http://somewhere/internal

## See It In Action

Expand Down
25 changes: 19 additions & 6 deletions docs/generated/CommandsInstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,36 +333,49 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch
Skip Download Cache - Use the original download even if a private CDN
cache is available for a package. Overrides the default feature
'downloadCache' set to 'True'. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare)
only.
only. See https://chocolatey.org/docs/features-private-cdn
--dc, --downloadcache, --download-cache, --use-download-cache
Use Download Cache - Use private CDN cache if available for a package.
Overrides the default feature 'downloadCache' set to 'True'. Available
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. See https://chocolate-
y.org/docs/features-private-cdn
--svc, --skipvirus, --skip-virus, --skipviruscheck, --skip-virus-check
Skip Virus Check - Skip the virus check for downloaded files on this ru-
n. Overrides the default feature 'virusCheck' set to 'True'. Available
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. See https://chocolate-
y.org/docs/features-virus-check
--virus, --viruscheck, --virus-check
Virus Check - check downloaded files for viruses. Overrides the default
feature 'virusCheck' set to 'True'. Available in 0.9.10+. Licensed
versions only.
versions only. See https://chocolatey.org/docs/features-virus-check
--viruspositivesmin, --virus-positives-minimum=VALUE
Virus Check Minimum Scan Result Positives - the minimum number of scan
result positives required to flag a package. Used when virusScannerType
is VirusTotal. Overrides the default configuration value
'virusCheckMinimumPositives' set to '5'. Available in 0.9.10+. Licensed
versions only.
versions only. See https://chocolatey.org/docs/features-virus-check
--install-arguments-sensitive=VALUE
InstallArgumentsSensitive - Install Arguments to pass to the native
installer in the package that are sensitive and you do not want logged.
Defaults to unspecified. Available in 0.10.1+. [Licensed versions](https://chocolatey.org/compare) only.
--package-parameters-sensitive=VALUE
PackageParametersSensitive - Package Parameters to pass the package that
are sensitive and you do not want logged. Defaults to unspecified.
Available in 0.10.1+. [Licensed versions](https://chocolatey.org/compare) only.
--dir, --directory, --installdir, --installdirectory, --install-dir, --install-directory=VALUE
Install Directory Override - Override the default installation director-
y. Chocolatey will automatically determine the type of installer and
pass the appropriate arguments to override the install directory. The
package must use Chocolatey install helpers and be installing an
installer for software. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
installer for software. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
See https://chocolatey.org/docs/features-install-directory-override
~~~

Expand Down
23 changes: 21 additions & 2 deletions docs/generated/CommandsNew.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,27 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch
override. Available in 0.9.10+.
--file=VALUE
Inspect a file (installer) to determine everything and create a package.
Available in 0.9.10+. Business versions only.
Inspect a file (native installer or zip) to to completely create a
package with proper silent arguments! Can be 32-bit or 64-bit
architecture. Available in 0.9.10+. Business versions only. See
https://chocolatey.org/docs/features-create-packages-from-installers
--file64=VALUE
Optional - used when specifying both a 32-bit and a 64-bit file. Can be
an installer or a zip. Available in 0.9.10+. Business versions only.
--url=VALUE
Url to download a file from to inspect and create a package. Available
in 0.9.10+. Business versions only.
--url64=VALUE
64 bit Url to download a file from. Inspects this file to create a
package if url isn't also specified. Available in 0.9.10+. Business
versions only.
--keepremote, --originallocation, --original-location, --useoriginallocation, --use-original-location, --useoriginalfileslocation, --use-original-files-location
Use Original Files Location - when using file or url, use the original
location in packaging. Available in 0.9.10+. Business versions only.
~~~

Expand Down
25 changes: 19 additions & 6 deletions docs/generated/CommandsUpgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,36 +239,49 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch
Skip Download Cache - Use the original download even if a private CDN
cache is available for a package. Overrides the default feature
'downloadCache' set to 'True'. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare)
only.
only. See https://chocolatey.org/docs/features-private-cdn
--dc, --downloadcache, --download-cache, --use-download-cache
Use Download Cache - Use private CDN cache if available for a package.
Overrides the default feature 'downloadCache' set to 'True'. Available
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. See https://chocolate-
y.org/docs/features-private-cdn
--svc, --skipvirus, --skip-virus, --skipviruscheck, --skip-virus-check
Skip Virus Check - Skip the virus check for downloaded files on this ru-
n. Overrides the default feature 'virusCheck' set to 'True'. Available
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. See https://chocolate-
y.org/docs/features-virus-check
--virus, --viruscheck, --virus-check
Virus Check - check downloaded files for viruses. Overrides the default
feature 'virusCheck' set to 'True'. Available in 0.9.10+. Licensed
versions only.
versions only. See https://chocolatey.org/docs/features-virus-check
--viruspositivesmin, --virus-positives-minimum=VALUE
Virus Check Minimum Scan Result Positives - the minimum number of scan
result positives required to flag a package. Used when virusScannerType
is VirusTotal. Overrides the default configuration value
'virusCheckMinimumPositives' set to '5'. Available in 0.9.10+. Licensed
versions only.
versions only. See https://chocolatey.org/docs/features-virus-check
--install-arguments-sensitive=VALUE
InstallArgumentsSensitive - Install Arguments to pass to the native
installer in the package that are sensitive and you do not want logged.
Defaults to unspecified. Available in 0.10.1+. [Licensed versions](https://chocolatey.org/compare) only.
--package-parameters-sensitive=VALUE
PackageParametersSensitive - Package Parameters to pass the package that
are sensitive and you do not want logged. Defaults to unspecified.
Available in 0.10.1+. [Licensed versions](https://chocolatey.org/compare) only.
--dir, --directory, --installdir, --installdirectory, --install-dir, --install-directory=VALUE
Install Directory Override - Override the default installation director-
y. Chocolatey will automatically determine the type of installer and
pass the appropriate arguments to override the install directory. The
package must use Chocolatey install helpers and be installing an
installer for software. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
installer for software. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only.
See https://chocolatey.org/docs/features-install-directory-override
~~~

Expand Down
2 changes: 2 additions & 0 deletions docs/generated/HelpersGetChecksumValid.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -----
Aliases |
Expand Down
4 changes: 3 additions & 1 deletion docs/generated/HelpersGetChocolateyUnzip.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ This is the full path to the zip file. If embedding it in the package
next to the install script, the path will be like
`"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.zip"`

In 0.10.1+, `File` is an alias for FileFullPath.

Property | Value
---------------------- | -----
Aliases |
Aliases | file
Required? | true
Position? | 1
Default Value |
Expand Down
29 changes: 25 additions & 4 deletions docs/generated/HelpersGetChocolateyWebFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Get-ChocolateyWebFile `
[-ChecksumType64 <String>] `
[-Options <Hashtable>] `
[-GetOriginalFileName] `
[-ForceDownload] `
[-IgnoredArguments <Object[]>] [<CommonParameters>]
~~~

Expand Down Expand Up @@ -149,14 +150,16 @@ parameter. Chocolatey will automatically determine if the user is
running a 64 bit OS or not and adjust accordingly. Please note that
the 32 bit url will be used in the absence of this. This parameter
should only be used for 64 bit native software. If the original Url
contains both (which is quite rare), set this to '$url' Otherwise remove
this parameter.
contains both (which is quite rare), set this to '$url' Otherwise
remove this parameter.

Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.

In 0.10.1+, `Url64` is an alias for Url64bit.

Property | Value
---------------------- | -----
Aliases |
Aliases | url64
Required? | false
Position? | 4
Default Value |
Expand Down Expand Up @@ -195,6 +198,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -----
Aliases |
Expand Down Expand Up @@ -243,6 +248,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -------------
Aliases |
Expand All @@ -264,7 +271,21 @@ Accept Pipeline Input? | false

### -GetOriginalFileName
OPTIONAL switch to allow Chocolatey to determine the original file name
from the url resource.
from the url resource. Available in 0.9.10+.

Property | Value
---------------------- | -----
Aliases |
Required? | false
Position? | named
Default Value | False
Accept Pipeline Input? | false

### -ForceDownload
OPTIONAL switch to force download of file every time, even if the file
already exists.

Available in 0.10.1+.

Property | Value
---------------------- | -----
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/HelpersGetVirusCheckValid.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in Pro / Business editions.

## Notes

Only [licensed editions](https://chocolatey.org/compare) of [Chocolatey pro](https://chocolatey.org/compare)vide runtime malware protection.
Only [licensed editions](https://chocolatey.org/compare) of Chocolatey provide runtime malware protection.

## Aliases

Expand Down
4 changes: 2 additions & 2 deletions docs/generated/HelpersInstallChocolateyInstallPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ you can get it to the path with
`"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\INSTALLER_FILE"`

Property | Value
---------------------- | -----
Aliases |
---------------------- | ------------
Aliases | fileFullPath
Required? | true
Position? | 4
Default Value |
Expand Down
23 changes: 22 additions & 1 deletion docs/generated/HelpersInstallChocolateyPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Install-ChocolateyPackage `
[-ChecksumType64 <String>] `
[-Options <Hashtable>] `
[-UseOnlyPackageSilentArguments] `
[-UseOriginalLocation] `
[-IgnoredArguments <Object[]>] [<CommonParameters>]
~~~

Expand Down Expand Up @@ -76,7 +77,7 @@ $packageArgs = @{
validExitCodes= @(0, 3010, 1641)
softwareName = 'Bob*'
checksum = '12345'
checksumType = 'sha1'
checksumType = 'sha256'
checksum64 = '123356'
checksumType64= 'sha256'
}
Expand Down Expand Up @@ -285,6 +286,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -----
Aliases |
Expand Down Expand Up @@ -327,6 +330,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -----
Aliases |
Expand Down Expand Up @@ -358,6 +363,22 @@ Position? | named
Default Value | False
Accept Pipeline Input? | false

### -UseOriginalLocation
Do not download the resources. This is typically passed if Url/Url64bit
are pointed to local files or files on a share and those files should
be used in place. Available in 0.10.1+.

NOTE: You can also use `Install-ChocolateyInstallPackage` for the same
functionality (see links).

Property | Value
---------------------- | -----
Aliases |
Required? | false
Position? | named
Default Value | False
Accept Pipeline Input? | false

### -IgnoredArguments [&lt;Object[]&gt;]
Allows splatting with arguments that do not apply. Do not use directly.

Expand Down
4 changes: 4 additions & 0 deletions docs/generated/HelpersInstallChocolateyPowershellCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -----
Aliases |
Expand Down Expand Up @@ -228,6 +230,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -----
Aliases |
Expand Down
2 changes: 2 additions & 0 deletions docs/generated/HelpersInstallChocolateyVsixPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ MD5 is not recommended as certain organizations need to use FIPS
compliant algorithms for hashing - see
https://support.microsoft.com/en-us/kb/811833 for more details.

The recommendation is to use at least SHA256.

Property | Value
---------------------- | -----
Aliases |
Expand Down
Loading

0 comments on commit e26c02c

Please sign in to comment.