Skip to content

Instantly share code, notes, and snippets.

@gerane
Created May 20, 2016 19:20
Show Gist options
  • Save gerane/38ac0bcb14533a17eeaf892ee0612046 to your computer and use it in GitHub Desktop.
Save gerane/38ac0bcb14533a17eeaf892ee0612046 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<plasterManifest version='0.1.0'>
<metadata>
<id>Unique-Template-Pkg-Name</id>
<!-- For display by UI's in a menu list -->
<title>New Toolkit</title>
<!-- For display by UI's in hover help -->
<description>Plaster template for creating the files for a PSAppDeploy Toolkit.</description>
<version>0.1.0</version>
<tags>Toolkit, Build</tags>
</metadata>
<parameters>
<parameter name='ToolkitName' type='input' required='true' prompt='Enter the name of the Toolkit'/>
<parameter name='Version' type='input' default='1.0.0' store='true' prompt='Enter the version number for the Toolkit'/>
<parameter name='DeployMode' type='multichoice' default='1' prompt='Select desired options'>
<choice label='&amp;Interactive Mode'
help="Sets Toolkit to Interactive Mode."
value="Interactive"/>
<choice label='&amp;NonInteractive Mode'
help="Sets Toolkit to NonInteractive Mode.."
value="NonInteractive"/>
<choice label='&amp;Silent'
help="Sets Toolkit to Silent Mode."
value="Silent"/>
</parameter>
<parameter name='Options' type='multichoice' default='0,1,2' prompt='Select desired options'>
<choice label='&amp;Pester test support'
help="Adds Tests directory and a starter Pester Tests file."
value="Pester"/>
<choice label='P&amp;Sake build script'
help="Adds a PSake build script that generates the module directory for publishing to the PSGallery."
value="PSake"/>
<choice label='&amp;Git'
help="Adds a .gitignore file."
value="Git"/>
</parameter>
<parameter name='Editor' type='choice' default='1' prompt='Which editor do you use'>
<choice label='&amp;ISE'
help="Your editor is PowerShell ISE."
value="ISE"/>
<choice label='&amp;Visual Studio Code'
help="Your editor is Visual Studio Code."
value="VSCode"/>
<choice label='&amp;None'
help="No editor specified."
value="None"/>
</parameter>
<parameter name='License' type='choice' default='2' prompt='Select a license for your module'>
<choice label='&amp;Apache'
help="Adds an Apache license file."
value="Apache"/>
<choice label='&amp;MIT'
help="Adds an MIT license file."
value="MIT"/>
<choice label='&amp;None'
help="No license specified."
value="None"/>
</parameter>
</parameters>
<dependencies>
<dependency id="another-template-id??"/>
</dependencies>
<content>
<!--Toolkit Files-->
<file source='Toolkit\Deploy-Application.exe'
destination='Toolkit\Deploy-Application.exe'/>
<file source='Toolkit\Deploy-Application.ps1'
destination='Toolkit\Deploy-Application.ps1'
template='true'/>
<file source='Toolkit\Deploy-Application.exe.config'
destination='Toolkit\Deploy-Application.exe.config'/>
<!--Files Folder-->
<file source='Toolkit\Files\'
destination='Toolkit\Files\'/>
<!--SupportFiles Folder-->
<file source='Toolkit\SupportFiles\'
destination='Toolkit\SupportFiles\'/>
<!--AppDeployToolkit Folder-->
<file source='Toolkit\AppDeployToolkit\AppDeployToolkitBanner.png'
destination='Toolkit\AppDeployToolkit\AppDeployToolkitBanner.png'/>
<file source='Toolkit\AppDeployToolkit\AppDeployToolkitConfig.xml'
destination='Toolkit\AppDeployToolkit\AppDeployToolkitConfig.xml'/>
<file source='Toolkit\AppDeployToolkit\AppDeployToolkitHelp.ps1'
destination='Toolkit\AppDeployToolkit\AppDeployToolkitHelp.ps1'/>
<file source='Toolkit\AppDeployToolkit\AppDeployToolkitLogo.ico'
destination='Toolkit\AppDeployToolkit\AppDeployToolkitLogo.ico'/>
<file source='Toolkit\AppDeployToolkit\AppDeployToolkitExtensions.ps1'
destination='Toolkit\AppDeployToolkit\AppDeployToolkitExtensions.ps1'/>
<file source='Toolkit\AppDeployToolkit\AppDeployToolkitMain.cs'
destination='Toolkit\AppDeployToolkit\AppDeployToolkitMain.cs'/>
<file source='Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1'
destination='Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1'/>
<file source='Toolkit\AppDeployToolkit\Invoke-Robocopy.format.ps1xml'
destination='Toolkit\AppDeployToolkit\Invoke-Robocopy.format.ps1xml'/>
<!--Private Folder-->
<file source='Toolkit\AppDeployToolkit\Private\Set-CarbonHostsEntry.ps1'
destination='Toolkit\AppDeployToolkit\Private\Set-CarbonHostsEntry.ps1'/>
<!--Public Folder -->
<file source='Toolkit\AppDeployToolkit\Public\Compare-FolderSize.ps1'
destination='Toolkit\AppDeployToolkit\Public\Compare-FolderSize.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Format-RobocopyOption.ps1'
destination='Toolkit\AppDeployToolkit\Public\Format-RobocopyOption.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Get-EventLogFromSourceName.ps1'
destination='Toolkit\AppDeployToolkit\Public\Get-EventLogFromSourceName.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Get-FileLockProcess.ps1'
destination='Toolkit\AppDeployToolkit\Public\Get-FileLockProcess.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Get-IdleTime.ps1'
destination='Toolkit\AppDeployToolkit\Public\Get-IdleTime.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Get-OSArchitecture.ps1'
destination='Toolkit\AppDeployToolkit\Public\Get-OSArchitecture.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Invoke-KaceRunkbot.ps1'
destination='Toolkit\AppDeployToolkit\Public\Invoke-KaceRunkbot.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Invoke-Robocopy.ps1'
destination='Toolkit\AppDeployToolkit\Public\Invoke-Robocopy.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Remove-FileLock.ps1'
destination='Toolkit\AppDeployToolkit\Public\Remove-FileLock.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Resolve-ProgramFilesPath.ps1'
destination='Toolkit\AppDeployToolkit\Public\Resolve-ProgramFilesPath.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Resolve-PSADTLogPath.ps1'
destination='Toolkit\AppDeployToolkit\Public\Resolve-PSADTLogPath.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Resolve-RobocopyExitCode.ps1'
destination='Toolkit\AppDeployToolkit\Public\Resolve-RobocopyExitCode.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Test-EventLog.ps1'
destination='Toolkit\AppDeployToolkit\Public\Test-EventLog.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Test-EventLogSource.ps1'
destination='Toolkit\AppDeployToolkit\Public\Test-EventLogSource.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Test-Msiexec.ps1'
destination='Toolkit\AppDeployToolkit\Public\Test-Msiexec.ps1'/>
<file source='Toolkit\AppDeployToolkit\Public\Write-PSADTEventLog.ps1'
destination='Toolkit\AppDeployToolkit\Public\Write-PSADTEventLog.ps1'/>
<!--Git-->
<file source='_gitignore'
destination='.gitignore'
condition='$PLASTER_PARAM_Options -contains "Git"'/>-->
<!--License-->
<file source='ApacheLicense.txt'
destination='LICENSE.txt'
template='true'
condition="$PLASTER_PARAM_License -eq 'Apache'"/>
<file source='MITLicense.txt'
destination='LICENSE.txt'
template='true'
condition="$PLASTER_PARAM_License -eq 'MIT'"/>
<!--PSake-->
<file source='Build.ps1'
destination='Build.ps1'
condition='$PLASTER_PARAM_Options -contains "PSake"'/>
<!--VS Code-->
<file source='tasks.json'
destination='.vscode\tasks.json'
condition="$PLASTER_PARAM_Editor -eq 'VSCode'"/>
<modify path='.vscode\tasks.json'
encoding='utf8'
condition="$PLASTER_PARAM_Editor -eq 'VSCode' -and $PLASTER_PARAM_Options -contains 'Pester' -and $PLASTER_FileContent -notmatch 'taskName&quot;:\s*&quot;Test&quot;'">
<replacement pattern='(?si)(?&lt;="tasks":\s*\[)(\s*)(?=\{)'>
<![CDATA[$1{
"taskName": "Test",
"suppressTaskName": true,
"isTestCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking Pester...'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
],
"problemMatcher": [
{
"owner": "powershell",
"fileLocation": ["absolute"],
"severity": "error",
"pattern": [
{
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
"message": 1
},
{
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
"file": 1,
"line": 2
}
]
}
]
},$1]]>
</replacement>
</modify>
</content>
</plasterManifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment