Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 4351e89

Browse files
committed
support more verbose versioning
1 parent 4e617b2 commit 4351e89

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

makerelease.ps1

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $version = "0.90"
33

44
function replaceVersionInfo($version)
55
{
6-
$versionInfoRegex = new-object Text.RegularExpressions.Regex "// NPP plugin platform for .Net v(\d+\.\d+) by Kasper B. Graversen etc.", "None"
6+
$versionInfoRegex = new-object Text.RegularExpressions.Regex "// NPP plugin platform for .Net v(\d+\.\d+(\.\d+)?) by Kasper B. Graversen etc.", "None"
77

88
$files = get-ChildItem -Path . -Recurse -ErrorAction SilentlyContinue -Filter *.cs
99
ForEach ($f in $files)
@@ -20,20 +20,23 @@ function replaceVersionInfo($version)
2020
}
2121
}
2222

23-
# zip the projectTemplate
2423
cd 'Visual Studio Project Template C#'
2524
$filename = "NppPlugin" + $version + ".zip"
25+
write-host "# zip the projectTemplate '$filename'" -foreground green
2626
& 'C:\Program Files\7-Zip\7z.exe' a -tzip $filename *
2727

28-
# copy projectTemplate to local VS
28+
2929
$vsTemplatepath = [Environment]::GetFolderPath("MyDocuments")+'\Visual Studio 2015\Templates\ProjectTemplates\Visual C#\'
30+
write-host "# Copy projectTemplate to VS: '$vsTemplatepath'" -foreground green
31+
del "$($vsTemplatepath)\nppplugin*.zip"
3032
copy $filename $($vsTemplatepath)
3133

32-
# Zip template and all source files
34+
35+
write-host "# Zip template and all source files" -foreground green
3336
cd ..
3437
replaceVersionInfo($version)
35-
& 'C:\Program Files\7-Zip\7z.exe' a -tzip c:\temp\nppDemoAndProjectTemplate$($version).zip *
38+
& 'C:\Program Files\7-Zip\7z.exe' a -tzip c:\temp\nppDemoAndProjectTemplate$($version).zip *
3639

37-
# remove temp files
38-
rm 'Visual Studio Project Template C#\NppPlugin*.zip'
3940

41+
write-host "# remove temp files" -foreground green
42+
rm 'Visual Studio Project Template C#\NppPlugin*.zip'

0 commit comments

Comments
 (0)