From 0be5df166926c405e1304a9294d21af1c0180ba0 Mon Sep 17 00:00:00 2001 From: b0wter Date: Tue, 29 Jan 2019 14:19:00 +0100 Subject: [PATCH] Added command to release script that adds the current version number to the about view. Fix for #18. --- scripts/create_github_release.sh | 5 +++++ src/webapi/Views.fs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/create_github_release.sh b/scripts/create_github_release.sh index b9df9c2..2776199 100755 --- a/scripts/create_github_release.sh +++ b/scripts/create_github_release.sh @@ -15,6 +15,11 @@ source scripts/credentials.sh source scripts/git_release.sh echo "The working tag is: $NEW_TAG." +# +# Replace current version in source view. +# +perl -pi -e "s/(?<=You are running version: )\d.\d.\d/$NEW_TAG/;" src/webapi/Views.fs + # # Create binaries. # diff --git a/src/webapi/Views.fs b/src/webapi/Views.fs index 675fffc..383a007 100644 --- a/src/webapi/Views.fs +++ b/src/webapi/Views.fs @@ -170,11 +170,11 @@ let aboutView = a [ _href "https://github.com/b0wter/torpedo"; _class "centered-text margin-top-05em link-text" ] [ str "GitHub"] span [] [ str "." ] ] - p [] [ small [] [ str "You are running ] ] + p [] [ small [] [ str "You are running version: 1.0.5"] ] br [] p [] [ a [ _href "javascript:history.back()"; _class "centered-text margin-top-05em link-text" ] [ str "Return"] ] ] ] - |> masterView [] \ No newline at end of file + |> masterView []