Skip to content

Commit efbb0de

Browse files
author
Maxime Mangel
committed
Release version 1.0.1
1 parent ad9f79e commit efbb0de

File tree

4 files changed

+33
-32
lines changed

4 files changed

+33
-32
lines changed

.paket/Paket.Restore.targets

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,10 @@
2727
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2828
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2929
<PaketBootStrapperExeDir Condition=" Exists('$(PaketBootStrapperExePath)') " >$([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\</PaketBootStrapperExeDir>
30-
30+
3131
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT' ">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
3232
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
3333

34-
<!-- Disable automagic references for F# DotNet SDK -->
35-
<!-- This will not do anything for other project types -->
36-
<!-- see https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1002-fsharp-in-dotnet-sdk.md -->
37-
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
38-
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
39-
4034
<!-- Disable Paket restore under NCrunch build -->
4135
<PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled>
4236

@@ -136,7 +130,7 @@
136130
<!-- Parse our simple 'paket.restore.cached' json ...-->
137131
<PaketRestoreCachedSplitObject Include="$([System.Text.RegularExpressions.Regex]::Split(`$(PaketRestoreCachedContents)`, `{|}|,`))"></PaketRestoreCachedSplitObject>
138132
<!-- Keep Key, Value ItemGroup-->
139-
<PaketRestoreCachedKeyValue Include="@(PaketRestoreCachedSplitObject)"
133+
<PaketRestoreCachedKeyValue Include="@(PaketRestoreCachedSplitObject)"
140134
Condition=" $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `&quot;: &quot;`).Length) &gt; 1 ">
141135
<Key>$([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``))</Key>
142136
<Value>$([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``))</Value>
@@ -169,7 +163,7 @@
169163
<Exec Command='$(PaketBootStrapperCommand)' Condition=" '$(PaketBootstrapperStyle)' == 'classic' AND Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
170164
<Error Text="Stop build because of PAKET_ERROR_ON_MSBUILD_EXEC and we need a full restore (hashes don't match)" Condition=" '$(PAKET_ERROR_ON_MSBUILD_EXEC)' == 'true' AND '$(PaketRestoreRequired)' == 'true' AND '$(PaketDisableGlobalRestore)' != 'true'" />
171165
<Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(PaketDisableGlobalRestore)' != 'true' " ContinueOnError="false" />
172-
166+
173167
<!-- Step 2 Detect project specific changes -->
174168
<ItemGroup>
175169
<MyTargetFrameworks Condition="'$(TargetFramework)' != '' " Include="$(TargetFramework)"></MyTargetFrameworks>

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## 1.0.1 - 2020-02-20
10+
11+
* Fix build.fsx, the app was built before updating Prelude.fs
12+
913
## 1.0.0 - 2020-02-20
1014

1115
### Fixed

build.fsx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,26 @@ let copyModules = BuildTask.create "CopyModules" [ npmInstall ] {
156156
// "Fable.Repl.Lib.fsproj"
157157
// }
158158

159+
let updatePreludeREPLVersion = BuildTask.create "UpdateREPLVersion" [ ] {
160+
let newVersion = Changelog.getLastVersion()
161+
162+
let reg = Regex(@"let \[<Literal>\] REPL_VERSION = ""(.*)""")
163+
let newLines =
164+
PRELUDE_FILE
165+
|> File.ReadLines
166+
|> Seq.map (fun line ->
167+
reg.Replace(line, fun m ->
168+
let previousVersion = m.Groups.[1].Value
169+
if previousVersion = newVersion then
170+
failwith "You need to update the version in the CHANGELOG.md before publishing a new version of the REPL"
171+
else
172+
m.Groups.[0].Value.Replace(m.Groups.[1].Value, newVersion)
173+
)
174+
)
175+
|> Seq.toArray
176+
177+
File.WriteAllLines(PRELUDE_FILE, newLines)
178+
}
159179

160180
let buildLib = BuildTask.create "BuildLib" [ copyModules ] {
161181
Npm.run "build-lib" id
@@ -186,46 +206,29 @@ let buildLib = BuildTask.create "BuildLib" [ copyModules ] {
186206
File.WriteAllLines(file, newLines)
187207
}
188208

189-
let buildApp = BuildTask.create "BuildApp" [ buildLib ] {
209+
let buildApp = BuildTask.create "BuildApp" [ updatePreludeREPLVersion.IfNeeded; buildLib ] {
190210
Npm.run "build" id
191211
}
192212

193213
let watchApp = BuildTask.create "WatchApp" [ buildLib ] {
194214
Npm.run "start" id
195215
}
196216

197-
let _release = BuildTask.create "Release" [ buildApp ] {
217+
let _release = BuildTask.create "Release" [ updatePreludeREPLVersion; buildApp ] {
198218
let token =
199219
match Environment.environVarOrDefault "GITHUB_TOKEN" "" with
200220
| s when not (String.IsNullOrWhiteSpace s) -> s
201221
| _ -> failwith "The Github token must be set in a GITHUB_TOKEN environmental variable"
202222

203-
let newVersion = Changelog.getLastVersion()
204-
205-
let reg = Regex(@"let \[<Literal>\] REPL_VERSION = ""(.*)""")
206-
let newLines =
207-
PRELUDE_FILE
208-
|> File.ReadLines
209-
|> Seq.map (fun line ->
210-
reg.Replace(line, fun m ->
211-
let previousVersion = m.Groups.[1].Value
212-
if previousVersion = newVersion then
213-
failwith "You need to update the version in the CHANGELOG.md before publishing a new version of the REPL"
214-
else
215-
m.Groups.[0].Value.Replace(m.Groups.[1].Value, newVersion)
216-
)
217-
)
218-
|> Seq.toArray
219-
220-
File.WriteAllLines(PRELUDE_FILE, newLines)
223+
let version = Changelog.getLastVersion()
221224

222225
Git.Staging.stageAll CWD
223-
let commitMsg = sprintf "Release version %s" newVersion
226+
let commitMsg = sprintf "Release version %s" version
224227
Git.Commit.exec CWD commitMsg
225228
Git.Branches.push CWD
226229

227230
GitHub.createClientWithToken token
228-
|> GitHub.draftNewRelease "fable-compiler" "repl" newVersion (Changelog.isPreRelease newVersion) (Changelog.getNotes newVersion)
231+
|> GitHub.draftNewRelease "fable-compiler" "repl" version (Changelog.isPreRelease version) (Changelog.getNotes version)
229232
// |> GitHub.uploadFile nupkg
230233
|> GitHub.publishDraft
231234
|> Async.RunSynchronously

src/App/Prelude.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ open Fable.Core
66

77
[<RequireQualifiedAccess>]
88
module Literals =
9-
let [<Literal>] REPL_VERSION = "1.0.0" // Do not edit manually
9+
let [<Literal>] REPL_VERSION = "1.0.1" // Do not edit manually
1010
let [<Literal>] FABLE_VERSION = "2.4.15" // Do not edit manually
1111
let [<Literal>] STORAGE_KEY = "fable-repl"
1212
let [<Literal>] MAX_LOGS_LENGTH = 200

0 commit comments

Comments
 (0)