File tree 4 files changed +41
-3
lines changed
4 files changed +41
-3
lines changed Original file line number Diff line number Diff line change
1
+ [CmdletBinding ()]
2
+ Param (
3
+ [String ][Parameter (Mandatory = $True )]$Version
4
+ )
5
+
6
+ Set-StrictMode - version Latest
7
+ $ErrorActionPreference = " Stop"
8
+
9
+ Write-Host " Updating version number to $Version " - ForegroundColor Green
10
+
11
+ Function AssignVersionToFile {
12
+ [CmdletBinding ()]
13
+ Param (
14
+ [String ][Parameter (Mandatory = $True )]$Path ,
15
+ [String ][Parameter (Mandatory = $True )]$RegEx ,
16
+ [String ][Parameter (Mandatory = $True )]$Replacement
17
+ )
18
+
19
+ (Get-Content $Path ) -Replace $RegEx , $Replacement | Out-File $Path - Encoding UTF8
20
+ }
21
+
22
+ AssignVersionToFile - Path " $PSScriptRoot \src\LZStringCSharp.csproj" - RegEx " Version>\d+\.\d+\.\d+" - Replacement " Version>$ ( $Version ) </"
23
+ AssignVersionToFile - Path " $PSScriptRoot \package.json" - RegEx " `" version`" : `" [^`" ]+`" " - Replacement " `" version`" : `" $ ( $Version ) `" "
24
+
25
+ Write-Host " Version updated!" - ForegroundColor Green
Original file line number Diff line number Diff line change 1
- {
1
+ {
2
2
"name" : " lz-string-csharp" ,
3
- "version" : " 1.3 .0" ,
3
+ "version" : " 1.4 .0" ,
4
4
"description" : " lz-string c# implementation" ,
5
5
"main" : " index.js" ,
6
6
"directories" : {
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<TargetFramework >netstandard1.0</TargetFramework >
5
+ <Description >LZ String C# Compression Library</Description >
6
+ <RepositoryUrl >https://github.com/jawa-the-hutt/lz-string-csharp</RepositoryUrl >
7
+ <PackageProjectUrl >https://github.com/jawa-the-hutt/lz-string-csharp</PackageProjectUrl >
8
+ <PackageLicenseUrl >https://github.com/jawa-the-hutt/lz-string-csharp/blob/master/LICENSE</PackageLicenseUrl >
9
+ <RepositoryType >git</RepositoryType >
10
+ <PackageTags >lz-string, compression</PackageTags >
11
+ <AssemblyVersion >1.3.0.0</AssemblyVersion >
12
+ <FileVersion >1.3.0.0</FileVersion >
13
+ <Company />
14
+ <Product >LZStringCSharp</Product >
15
+ <Authors >jawa-the-hutt, christianrondeau</Authors >
16
+ <Version >1.3.0</Version >
17
+ <PackageId >LZStringCSharp</PackageId >
5
18
</PropertyGroup >
6
19
7
- </Project >
20
+ </Project >
You can’t perform that action at this time.
0 commit comments