-
Notifications
You must be signed in to change notification settings - Fork 45
Tools: WTS Packaging Tool
The WTS Packaging Tool is located here. It is mainly used to prepare and publish template packages but also has the functionality to list, download and get info from available packages.
Allows you to prepare a folder for packaging. Gives the possibility to exclude folders from the final package and adds a file with the version information to the package.
WtsPackagingTool.exe package-task -p "prepare_dir" -e "exclude" -v "version" -t "target-platform" -l "language"
where:
- prepare_dir: folder to be copied. This will normally point to your local template repository folder, [folder_you_cloned_WTS]\templates.
- exclude: exclusion filters to be applied to the preparation directory. This will exclude from the copy the directories with names matching the specified patterns (C# Regular expressions). Separated by ';'. For example "StyleCop" is used to exclude the StyleCop test templates.
- version: Version number (major.minor.build.revision) to be prepared.
- target-platform: Includes only templates of the specified platform.
- language: Includes only templates of the specified language.
Example:
WtsPackagingTool.exe package-task -p c:\code\WTS\templates -e "StyleCop" -v 0.1.0.0 -t "Uwp" -l "C#"
Allows you to create a package from a folder. If you specify a cert thumbprint the package will be signed.
WtsPackagingTool.exe package-task -n "template_folder" -f "out-file" -c "cert"
Where:
- template_folder: contents in the folder specified in this option will be used to create the package, specify here the template folder resulting from the prepare-package command
- out-file: Output file name (myfile.mstx) to be used for package creation
- cert (optional): Certificate thumbprint to be used in the package creation
Example:
WtsPackagingTool.exe package-task -n c:\code\Preparation_v0.1.0.0\Templates\ -f c:\code\Latest\Uwp.CS.Templates.mstx
Publishes a templates package to the specified environment.
WtsPackagingTool.exe publish -a "storage-account" -k "storage-key" -e "environment" -f "file" -v "version" -p "platform" -l "language" -w "wizard-version"
Where:
- storage-account: Storage account where the templates are published to.
- storage-key: Storage Account key to be used for package publishing. env: Environment. Valid values: Pro, Pre, Dev or Test
- file: Mstx file to publish.
- version: Version number for the templates package to be published.
- platform: Platform the package was built for.
- language: Language the package was built for.
- wizard-version: Wizard versions the package is compatible with.
Example:
WtsPackagingTool.exe publish -a "myaccount" -f c:\templates\Templates.mstx -e Dev -k mykey -v 0.14.0.1
-p "Uwp" -l "C#" -w "0.14"`
Lists all available versions from an environment.
WtsPackagingTool.exe list-version -e "env" -s -d -b
Where:
- env: Environment. Valid values: Pro, Pre, Dev or Test
- s (summary): Shows summary info.
- d (detailed): Shows detailed versions info.
- b (build): If specified the information will be created on-the-fly with the existing packages published in the storage.
Example:
WtsPackagingTool.exe list-versions -e "Dev" -d
Downloads the specified package
WtsPackagingTool.exe download -e "env" -v "version" -d "destination-dir" -p "platform" -s "language"
Where:
- env: Environment. Valid values: Pro, Pre, Dev or Test
- Version: the version of the templates package to download. If only part of the version is specified the most recent matching version is downloaded
- destination-dir: Destination directory for download.
- latest: Download the latest available version of templates package for the specified environment.
- c (config): Download the configuration file from the CDN.
- p (platform): Downloads a templates package for the specified platform.
- s (source-language): Downloads a templates package for the specified language.
Example:
WtsPackagingTool.exe download -e "Dev" -v "0.19" -d "c:\temp" -p "Uwp" -s "C#"
Gets the info for a specified package
WtsPackagingTool.exe package-task -i "package_filename"
Where:
- package_filename: Filename of the package you want to get the info for.
Example:
WtsPackagingTool.exe package-task -i c:\code\Latest\Templates.mstx
Extracts the package content.
WtsPackagingTool.exe package-task -x "package_filename" -d "destination-dir"
Where:
- package_filename: Package file name you want to extract the contents for
- destination-dir: Destination directory path to be used for extraction
Example:
WtsPackagingTool.exe package-task -x "C:\temp\Templates.mstx" -d "c:\temp"