File tree 3 files changed +13
-10
lines changed
src/build/WebSharper.Build 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ module Config =
26
26
let PackageId = " WebSharper"
27
27
let CompilerPackageId = " WebSharper.Compiler"
28
28
let PlainVersion = " 3.5"
29
- let PackageVersion = PlainVersion
29
+ let VersionSuffix = Some " -alpha"
30
+ let PackageVersion = PlainVersion + defaultArg VersionSuffix " "
30
31
let NumericVersion = Version( PlainVersion + " .0.0" )
31
- let VersionSuffix = None
32
32
let Company = " IntelliFactory"
33
33
let Description = " F#-to-JavaScript compiler and web application framework"
34
34
let CompilerDescription = " F#-to-JavaScript compiler"
Original file line number Diff line number Diff line change @@ -152,8 +152,8 @@ module Main =
152
152
}
153
153
let compilerNuPkg =
154
154
let bt =
155
- bt.PackageId( Config.CompilerPackageId)
156
- |> PackageVersion.Full.Custom ( Version( nuPkg.GetComputedVersion()))
155
+ bt.PackageId( Config.CompilerPackageId, Config.PackageVersion )
156
+ |> PackageVersion.Full.Custom ( Version( nuPkg.GetComputedVersion() .Split ( '-' ).[ 0 ] ))
157
157
bt.NuGet.CreatePackage()
158
158
.Configure( fun x ->
159
159
{
Original file line number Diff line number Diff line change @@ -21,14 +21,17 @@ let UpdateAsmVersionAttr (filePath: string) (version: string) =
21
21
else l
22
22
)
23
23
24
- let UpdateConfigFs ( filePath : string ) ( version : string ) ( suffix : string ) =
24
+ let UpdateConfigFs ( filePath : string ) ( version : string ) ( suffix : option < string > ) =
25
25
ReplacePerLine filePath ( fun l ->
26
26
if l.Contains " let PlainVersion" then
27
27
Regex( " \" [0-9.]+\" " )
28
28
.Replace( l, " \" " + version + " \" " )
29
- elif l.Contains " let PackageVersion" then
30
- Regex( " \" .*\" " )
31
- .Replace( l, " \" " + suffix + " \" " )
29
+ elif l.Contains " let VersionSuffix" then
30
+ Regex( " None|Some \" .*\" " )
31
+ .Replace( l,
32
+ match suffix with
33
+ | None -> " None"
34
+ | Some suffix -> " Some \" " + suffix + " \" " )
32
35
else l
33
36
)
34
37
63
66
UpdateWebsiteConfigFs ( sln +/ " tests" +/ " Website" +/ " Config.fs" ) v
64
67
UpdateOptionsFs ( src +/ " compiler" +/ " WebSharper" +/ " Options.fs" ) v
65
68
match fsi.CommandLineArgs with
66
- | [| _ fsx; v |] -> run v " "
67
- | [| _ fsx; v; s |] -> run v ( " -" + s)
69
+ | [| _ fsx; v |] -> run v None
70
+ | [| _ fsx; v; s |] -> run v ( Some ( " -" + s) )
68
71
| args ->
69
72
eprintfn " Usage: UpdateVersion VERSION [SUFFIX]"
70
73
eprintfn " %A " args
You can’t perform that action at this time.
0 commit comments