This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2019 <CompanyName> | |
* All rights reserved. | |
*/ | |
'use strict'; | |
function flattenArray(sourceArray) { | |
var resultArray = []; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Enables privileges in the access token of the current process. This allows the process to perform system-level actions that it could not previously. | |
This code was adapted from the following link: https://msdn.microsoft.com/en-us/library/windows/desktop/aa446619(v=vs.85).aspx. | |
.PARAMETER Privilege | |
Specifies, as a string array, the privileges to be enabled. More information about privileges can be found at | |
https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx. | |
.NOTES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
[Parameter(Mandatory=$true)] | |
[string] $AssemblyInfoPath | |
) | |
$ErrorActionPreference = 'Stop' # Stops executing on error instead of silent continue. | |
Set-StrictMode -Version Latest # Enforces coding rules in expressions, scripts, and script blocks. Uninitialized variables are not permitted. | |
$fileContent = Get-Content $AssemblyInfoPath | Out-String | |
$assemblyVersionCapturePattern = 'AssemblyVersion\("\d+\.\d+\.\d+\.(\d+)"\)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
[Parameter(Mandatory=$true)] | |
[string[]] $AssemblyInfoFilesPath, | |
[Parameter(Mandatory=$true)] | |
[Version] $Version | |
) | |
$ErrorActionPreference = 'Stop' # Stops executing on error instead of silent continue. | |
Set-StrictMode -Version Latest # Enforces coding rules in expressions, scripts, and script blocks. Uninitialized variables are not permitted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
[Parameter(Mandatory=$true)] | |
[string] $AssemblyInfoPath, | |
[string] $PropertiesFilePath = 'EnvInjectProperties.txt', | |
[string] $PropertyName = 'NEXT_VERSION' | |
) | |
$ErrorActionPreference = 'Stop' # Stops executing on error instead of silent continue. | |
Set-StrictMode -Version Latest # Enforces coding rules in expressions, scripts, and script blocks. Uninitialized variables are not permitted. |