1 Star 0 Fork 0

冰雅轩/HugeFiles

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
makerelease.ps1 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
molsonkiko 提交于 2022-09-04 07:33 +08:00 . First commit
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
$version = "0.94.00"
$vsRelease = "2019"
function replaceVersionInfo($version)
{
$versionInfoRegex = new-object Text.RegularExpressions.Regex "// NPP plugin platform for .Net v(\d+\.\d+(\.\d+)?) by Kasper B. Graversen etc.", "None"
$files = get-ChildItem -Path . -Recurse -ErrorAction SilentlyContinue -Filter *.cs
ForEach ($f in $files)
{
$name = $f.Fullname
$content = [IO.File]::ReadAllText($name)
$original = $content
$content = $versionInfoRegex.Replace($content, "// NPP plugin platform for .Net v"+ $version + " by Kasper B. Graversen etc.")
If ($content -ne $original)
{
[IO.File]::WriteAllText("$name", $content, [Text.Encoding]::"UTF8")
}
}
}
cd 'Visual Studio Project Template C#'
replaceVersionInfo($version)
$filename = "NppPlugin" + $version + ".zip"
write-host "# zip the projectTemplate '$filename'" -foreground green
& 'C:\Program Files\7-Zip\7z.exe' a -tzip $filename * -xr!bin -xr!obj
$vsTemplatepath = [Environment]::GetFolderPath("MyDocuments") + "\Visual Studio " +
$vsRelease + '\Templates\ProjectTemplates\Visual C#\'
write-host "# Copy projectTemplate to VS: '$vsTemplatepath'" -foreground green
if (Test-Path $vsTemplatepath) {
del "$($vsTemplatepath)\nppplugin*.zip"
} else {
ni -ItemType Directory -Force -Path $vsTemplatepath
}
copy $filename $($vsTemplatepath)
write-host "# remove temp files" -foreground green
rm $filename
cd ..
# Read-Host -Prompt "Press Enter to continue"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ice_elegant/HugeFiles.git
git@gitee.com:ice_elegant/HugeFiles.git
ice_elegant
HugeFiles
HugeFiles
dependabot/github_actions/actions/upload-artifact-4

搜索帮助