mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-16 06:37:54 +08:00
Updated build and pack Powershell
This commit is contained in:
@ -0,0 +1,52 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Pack cmder
|
||||
.DESCRIPTION
|
||||
Use this script to pack cmder into release archives
|
||||
|
||||
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||
Then unblock the script for execution with UnblockFile .\pack.ps1
|
||||
.EXAMPLE
|
||||
.\pack.ps1
|
||||
|
||||
Creates default archives for cmder
|
||||
.EXAMPLE
|
||||
.\build -verbose
|
||||
|
||||
Creates default archives for cmder with plenty of information
|
||||
.NOTES
|
||||
AUTHORS
|
||||
Samuel Vasko, Jack Bennett
|
||||
Part of the Cmder project.
|
||||
.LINK
|
||||
https://github.com/bliker/cmder - Project Home
|
||||
#>
|
||||
|
||||
[CmdletBinding(SupportsShouldProcess=$true)]
|
||||
Param(
|
||||
# CmdletBinding will give us;
|
||||
# -verbose switch to turn on logging and
|
||||
# -whatif switch to not actually make changes
|
||||
|
||||
# Path to the vendor configuration source file
|
||||
[string]$cmderRoot = "..",
|
||||
|
||||
# Vendor folder locaton
|
||||
[string]$saveTo = "."
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\utils.ps1"
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$targets = @{
|
||||
"cmder.zip" = $null;
|
||||
"cmder.7z" = $null;
|
||||
"cmder_mini.zip" = "-x!`"..\vendor\msysgit`"";
|
||||
}
|
||||
|
||||
$version = Invoke-Expression "git describe --abbrev=0 --tags"
|
||||
New-Item -ItemType file "$cmderRoot\Version $version"
|
||||
|
||||
foreach ($t in $targets.GetEnumerator()) {
|
||||
Create-Archive $cmderRoot "$saveTo\$($t.Name)" $t.Value
|
||||
}
|
Reference in New Issue
Block a user