Skip to content

Commit

Permalink
chore: update release script to support Fable.Form.Simple.Fields.Html
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelMaxime committed Oct 12, 2024
1 parent 4063ed2 commit f189390
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions build/Commands/Release.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ let private capitalizeFirstLetter (text: string) =
type Project =
| FableForm
| FableFormSimple
| FableFormSimpleFieldsHtml
| FableFormSimpleBulma
| FableFormSimpleBulmaNpm
| All
Expand All @@ -36,13 +37,14 @@ type ProjectTypeConverter() =
match text with
| "Fable.Form" -> Project.FableForm
| "Fable.Form.Simple" -> Project.FableFormSimple
| "Fable.Form.Simple.Fields.Html" -> Project.FableFormSimpleFieldsHtml
| "Fable.Form.Simple.Bulma" -> Project.FableFormSimpleBulma
| "fable-form-simple-bulma" -> Project.FableFormSimpleBulmaNpm
| "all"
| "All" -> Project.All
| _ -> raise <| System.InvalidOperationException("Invalid project name")
| _ -> raise <| InvalidOperationException("Invalid project name")

| _ -> raise <| System.InvalidOperationException("Invalid project name")
| _ -> raise <| InvalidOperationException("Invalid project name")

type ReleaseSettings() =
inherit CommandSettings()
Expand All @@ -66,6 +68,7 @@ type ReleaseSettings() =
Possible values:
- Fable.Form
- Fable.Form.Simple
- Fable.Form.Simple.Fields.Html
- Fable.Form.Simple.Bulma
- fable-form-simple-bulma
Expand Down Expand Up @@ -167,6 +170,8 @@ let private getReleaseContext
match settings.Project with
| Project.FableForm -> List.contains "Fable.Form" tags
| Project.FableFormSimple -> List.contains "Fable.Form.Simple" tags
| Project.FableFormSimpleFieldsHtml ->
List.contains "Fable.Form.Simple.Fields.Html" tags
| Project.FableFormSimpleBulma -> List.contains "Fable.Form.Simple.Bulma" tags
| Project.FableFormSimpleBulmaNpm ->
List.contains "Fable.Form.Simple.Bulma.Npm" tags
Expand Down Expand Up @@ -405,6 +410,13 @@ let private releaseFableFormSimple (repository: Repository) (settings: ReleaseSe
Workspace.packages.``Fable.Form.Simple``.``Fable.Form.Simple.fsproj``
Workspace.packages.``Fable.Form.Simple``.``CHANGELOG.md``

let private releaseFableFormSimpleFieldsHtml (repository: Repository) (settings: ReleaseSettings) =
releaseProject
repository
settings
Workspace.packages.``Fable.Form.Simple.Fields.Html``.``Fable.Form.Simple.Fields.Html.fsproj``
Workspace.packages.``Fable.Form.Simple.Fields.Html``.``CHANGELOG.md``

let private releaseFableFormSimpleBulma (repository: Repository) (settings: ReleaseSettings) =
releaseProject
repository
Expand Down Expand Up @@ -441,10 +453,12 @@ type ReleaseCommand() =
| Project.FableForm -> releaseFableForm repository settings
| Project.FableFormSimple -> releaseFableFormSimple repository settings
| Project.FableFormSimpleBulma -> releaseFableFormSimpleBulma repository settings
| Project.FableFormSimpleFieldsHtml -> releaseFableFormSimpleFieldsHtml repository settings
| Project.FableFormSimpleBulmaNpm -> releaseFableFormSimpleBulmaNpm repository settings
| Project.All ->
releaseFableForm repository settings
releaseFableFormSimple repository settings
releaseFableFormSimpleFieldsHtml repository settings
releaseFableFormSimpleBulma repository settings
releaseFableFormSimpleBulmaNpm repository settings

Expand Down

0 comments on commit f189390

Please sign in to comment.