mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 11:15:08 +00:00
Updates to script file
This commit is contained in:
@@ -1,17 +1,4 @@
|
||||
#Set-ExecutionPolicy RemoteSigned
|
||||
function Usage
|
||||
{
|
||||
echo "This is ";
|
||||
echo “Usage: “;
|
||||
echo ” from cmd.exe: “;
|
||||
echo ” powershell.exe SetVersion.ps1 2.8.3.0″;
|
||||
echo ” “;
|
||||
echo ” from powershell.exe prompt: “;
|
||||
echo ” .\SetVersion.ps1 2.8.3.0″;
|
||||
echo ” “;
|
||||
}
|
||||
|
||||
function Update-SourceVersion
|
||||
function Update-SourceVersion
|
||||
{
|
||||
Param ([string]$Version)
|
||||
$NewVersion = ‘AssemblyVersion("‘ + $Version + ‘.*")’;
|
||||
@@ -35,14 +22,14 @@ function Update-AllAssemblyInfoFiles ( $version )
|
||||
|
||||
# validate arguments
|
||||
$r= [System.Text.RegularExpressions.Regex]::Match($args[0], "^\d+\.\d+\.\d+$");
|
||||
if ($r.Success)
|
||||
{
|
||||
Update-AllAssemblyInfoFiles $args[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ” “;
|
||||
echo “Bad Input!”
|
||||
echo ” “;
|
||||
Usage ;
|
||||
if ($r.Success)
|
||||
{
|
||||
Update-AllAssemblyInfoFiles $args[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ” “;
|
||||
echo “Error: Input version does not match x.y.z format!”
|
||||
echo ” “;
|
||||
echo "Unable to apply version to AssemblyInfo.cs files";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user